July
2005
StatTraq Plugin Speed Improvement
I can’t take credit for this one but I thoguh I would share it. Richard at Boakes.com pointed out a feature in MySql which can really improve performance on applications using primarily insert database calls. Applying this to the StatTraq application provides a potential speed up to your stattraq database insert calls by 90%!
Open up /plugins/stattraq.php and edit line somewhere around line 49.
Where it reads: INSERT INTO
Edit it to read: INSERT DELAYED INTO
The discovery I stumbled upon, the source of the massive speedup, is that I’ve added the keyword “DELAYED†to the statement that inserts the log entry into the statistics table. This instructs the database that the stats program does not care about waiting to know that the log was definitely, entirely, and completely written. Instead the Database immediately returns a happy message so the web server can get on with generating and sending the page.
One word, 90%+ speed increase. If only every thing could be so positive we’d have a cure for the common cold by bedtime.
Rodney
Website News
RSS feed
Link

Leave a comment