4
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.

WordPress database error: [Can't find file: 'wp_comments' (errno: 2)]
SELECT * FROM wp_comments WHERE comment_post_ID = '769' AND comment_approved = '1' ORDER BY comment_date

 

Leave a comment

 
Rodney's 404 Handler Plugin plugged in.
Rodney's Adsense-Deluxe Add ons plugged in.
Rodney's Bread Crumbs plugged in.
Rodney's Edupage Email Import plugged in.
Rodney's Hierarchy for shupe.ca plugged in.
Rodney's Meta Tags plugged in.
Rodney's Most Recent plugged in.
Rodney's Permalink Override plugged in.
Rodney's Widget for the FAlbum. plugged in.
Using Yaletown Theme for Wordpress.