Title: Making Plugins More Efficient
Last modified: August 18, 2016

---

# Making Plugins More Efficient

 *  [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * (@southbeach030)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/)
 * I believe I have some plugins that are terribly ineffective (such as recent comments,
   top commenters, among others).
 * However, these plugins are ESSENTIAL to the functionality of my site, and what
   the readers want and use.
 * What can be done to make a particular plugin LESS of a SQL hog?
 * – Can indexes be created in MySQL to improve query performance? If so, how?
 * – Is there a company/person/service that can re-write a particular plugin for
   you? What is the cost?
 * – How can I find exactly which of my plugins are causing the MOST damage to my
   CPU % usage? What are the most expensive?
 * Any other ideas?
 * I’ve done EVERYTHING to speed up site.. you name it (wp-cache, eAccelerator, 
   query caching, Varnish HTTP proxy caching, and MORE)…
 * It’s coming down to either DB tuning, or bad code in my site that needs re-writes…
 * Thank you very much in advance.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/#post-598697)
 * _Is there a company/person/service that can re-write a particular plugin for 
   you? What is the cost?_
 * Cost aside (no bidding here, see Forum Rules, section F):
    – you can post here
   with a contact address requestiong paid support; the hread will be closed – post
   to the wp-pro list: [http://lists.automattic.com/mailman/listinfo/wp-pro](http://lists.automattic.com/mailman/listinfo/wp-pro)
 *  [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/#post-598710)
 * Hmm from what I think “such as recent comments, top commenters” can’t be cache
   because they suppose to be real time. It also depends on your complexity of your
   queries and the server hosting your site/db
 *  Thread Starter [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * (@southbeach030)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/#post-599037)
 * How can I find the proper way to ensure that (at the very LEAST) I have indexes
   in the proper places?
 * myphpadmin indicates that I may not have the proper indexes, since I have a lot
   of full_joins taking place…
 * _**Select\_full\_join 295 **
    The number of joins that do not use indexes. If
   this value is not 0, you should carefully check the indexes of your tables.
 *  Thread Starter [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * (@southbeach030)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/#post-599038)
 * in other words.. with the “recent comments” and “top commenters”, etc.. what 
   kind of index should I create?
 * Can anyone please share a quick walk-through on how I could test this out?
 * Thank you!
 *  Thread Starter [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * (@southbeach030)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/#post-599039)
 * Here’s an example of a slow query (25 seconds)… it seems as if it’s the “recent
   comments” plugin, but I cannot be 100% sure.
 * Can anyone suggest an index (in either wp_posts or wp_comments) that might speed
   up this query?
 * I’ve done everything possible under wordpress (caching, sql query cache, opcode
   cache, and more)..
 * # Query_time: 25 Lock_time: 0 Rows_sent: 15 Rows_examined: 72625
    **SELECT** 
   wp_posts.ID, post_title, post_name, post_date, **COUNT**(wp_comments.comment_post_ID)**
   AS** ‘comment_total’ **FROM** wp_posts **LEFT JOIN** wp_comments ON wp_posts.
   ID = wp_comments.comment_post_ID **WHERE** comment_approved = ‘1’ **AND** post_date_gmt
   < ‘2007-07-30 13:42:54’ **AND** post_status = ‘publish’ **AND** post_password
   = ” **GROUP BY** wp_comments.comment_post_ID **ORDER BY** comment_total **DESC
   LIMIT** 15;
 * Thanks again in advance.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Making Plugins More Efficient’ is closed to new replies.

## Tags

 * [cpu-usage](https://wordpress.org/support/topic-tag/cpu-usage/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)
 * [tuning](https://wordpress.org/support/topic-tag/tuning/)

 * 5 replies
 * 3 participants
 * Last reply from: [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/making-plugins-more-efficient/#post-599039)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
