Title: [Plugin: Get Recent Comments] Database SQL commands optimization
Last modified: August 20, 2016

---

# [Plugin: Get Recent Comments] Database SQL commands optimization

 *  [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-get-recent-comments-database-sql-commands-optimization/)
 * Hello,
 * this is a fine plugin, but has slow queries on one of sites we maintain. The 
   site has 300,000 comments and the basic queries in this plugin take 3 seconds.
   That’s too much even if the plugin is caching the output – the new comments just
   keep on coming and the cache has to be refreshed quite often.
 * These queries are sorting by comment_date and that takes a lot of time. If I 
   change the sort from comment_date to comment_ID, it takes only 0.01 seconds. 
   That’s a **huge improvement**. When you look at WordPress tables, comment_date
   is not indexed, but comment_date_gmt is. So sorting by **comment_date_gmt** also
   increased performance a lot, queries take 0.01 seconds.
 * Other problematic query is the one which checks for comment_type to equal trackback
   or pingback. Comparing these string values is slow, adds 1 extra second on our
   big DB.
 * Is this plugin still maintained?
 * Thanks,
    Martin
 * [http://wordpress.org/extend/plugins/get-recent-comments/](http://wordpress.org/extend/plugins/get-recent-comments/)

Viewing 1 replies (of 1 total)

 *  [ramthej](https://wordpress.org/support/users/ramthej/)
 * (@ramthej)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-get-recent-comments-database-sql-commands-optimization/#post-2297649)
 * Good post..!!
    [<b>Alleppey houseboats</b>](http://www.thehouseboatkerala.com/)

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Get Recent Comments] Database SQL commands optimization’ is 
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/get-recent-comments.svg)
 * [Get Recent Comments](https://wordpress.org/plugins/get-recent-comments/)
 * [Support Threads](https://wordpress.org/support/plugin/get-recent-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/get-recent-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/get-recent-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/get-recent-comments/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ramthej](https://wordpress.org/support/users/ramthej/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-get-recent-comments-database-sql-commands-optimization/#post-2297649)
 * Status: not resolved