Optimize WP-PostRating db table

Suffering from slow WP-PostRating plugin? Here’s how you could make it faster — add an index to the plugin’s database:

“`sql
ALTER TABLE `wp`.`wp_ratings` ADD INDEX `Select1`(`rating_postid`, `rating_ip`);
“`

Quick and painless. Replace `wp.wp_ratings` with the table name you are using.

It is BTW quite common for WordPress plugins that come with their own database tables not to create indexes. You may not notice that on a low traffic server but when using such plugins on high traffic servers such as Smashing Magazine you have to look out for them and take action.


Posted

in

by

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.