Title: Hanging SQL Queries
Last modified: August 19, 2016

---

# Hanging SQL Queries

 *  [powderboy](https://wordpress.org/support/users/powderboy/)
 * (@powderboy)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/hanging-sql-queries/)
 * I’ve been having a heck of a time lately with my site ( [http://www.feedthehabit.com](http://www.feedthehabit.com))
   exceeding the CPU usage on [http://www.Bluehost.com](http://www.Bluehost.com).
   I’ve been disabling plugins left and right to try to pinpoint it, but it’s still
   having issues. Here are a few sample queries that are taking a LONG Time:
 * # Tue Oct 14 18:34:32 2008
    # Query_time: 269 Lock_time: 6 Rows_sent: 1 Rows_examined:
   2 use feedtheh_wrdp2; SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.
   post_name = ‘2006-banshee-pyre-mountain-bike’ AND wp_posts.post_type = ‘post’
   ORDER BY wp_posts.post_date DESC ========= # Tue Oct 14 18:34:51 2008 # Query_time:
   283 Lock_time: 197 Rows_sent: 0 Rows_examined: 0 use feedtheh_wrdp2; SELECT wp_posts.*
   FROM wp_posts WHERE 1=1 AND wp_posts.post_name = ‘2006-banshee-pyre-mountain-
   bike’ AND wp_posts.post_type = ‘post’ ORDER BY wp_posts.post_date DESC ======
   === # Tue Oct 14 18:34:55 2008 # Query_time: 276 Lock_time: 256 Rows_sent: 0 
   Rows_examined: 0 use feedtheh_wrdp2; SELECT wp_posts.* FROM wp_posts WHERE 1=
   1 AND wp_posts.post_name = ‘delta-7-sports-releases-the-revolutionary-arantix-
   isotruss-mountain-bike-frame’ AND wp_posts.post_type = ‘post’ ORDER BY wp_posts.
   post_date DESC ========= # Tue Oct 14 18:34:55 2008 # Query_time: 274 Lock_time:
   0 Rows_sent: 0 Rows_examined: 0 use feedtheh_wrdp2; SELECT t.*, tt.*, tr.object_id
   FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id
   INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
   WHERE tt.taxonomy IN (‘category’, ‘post_tag’) AND tr.object_id IN (64) ORDER 
   BY t.name ASC ========= # Tue Oct 14 18:34:57 2008 # Query_time: 112 Lock_time:
   105 Rows_sent: 1 Rows_examined: 2 use feedtheh_wrdp2; SELECT wp_posts.* FROM 
   wp_posts WHERE 1=1 AND wp_posts.post_name = ‘goodie-patrol-with-steamboat-powdercats’
   AND wp_posts.post_type = ‘post’ ORDER BY wp_posts.post_date DESC ========= # 
   Tue Oct 14 18:34:59 2008 # Query_time: 62 Lock_time: 55 Rows_sent: 10 Rows_examined:
   1164 use feedtheh_wrdp2; SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts 
   WHERE 1=1 AND (((wp_posts.post_title LIKE ‘%horst%’) OR (wp_posts.post_content
   LIKE ‘%horst%’))) AND (wp_posts.post_status = ‘publish’) ORDER BY wp_posts.post_date
   DESC LIMIT 0, 10 ========= # Mon Oct 6 09:54:37 2008 # Query_time: 68 Lock_time:
   0 Rows_sent: 0 Rows_examined: 0 use feedtheh_wrdp2; SELECT option_value FROM 
   wp_options WHERE option_name = ‘siteurl’ =========
 * Several are the same query, but with different posts. One seems to be with site
   search and the other… I have no clue.
 * Anyone have any suggestions? I’m on PHP5 with FastCGI enabled. I’m tempted to
   install WP Super Cache, but I’m leery of some of the caching issues I’ll run 
   into (sidebar not updating, categories not updating, negative SEO because the
   content will be crusty, etc.)
 * Thanks!

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

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/hanging-sql-queries/#post-880491)
 * Disable ALL plugins and see if the problem goes away.
 *  Thread Starter [powderboy](https://wordpress.org/support/users/powderboy/)
 * (@powderboy)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/hanging-sql-queries/#post-880493)
 * That’s a good suggestion, but if I disable all of them, many things will go haywire,
   so I may have to wait for a maintenance window. I’ll do my best and see what 
   happens. Thanks!
 *  [bernardborealis](https://wordpress.org/support/users/bernardborealis/)
 * (@bernardborealis)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/hanging-sql-queries/#post-880646)
 * Try my suggestions here, too:
    [](http://wordpress.org/support/topic/197243?replies=2)
 *  [bernardborealis](https://wordpress.org/support/users/bernardborealis/)
 * (@bernardborealis)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/hanging-sql-queries/#post-880647)
 * Er… here:
    [http://wordpress.org/support/topic/197243?replies=2](http://wordpress.org/support/topic/197243?replies=2)

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

The topic ‘Hanging SQL Queries’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [bernardborealis](https://wordpress.org/support/users/bernardborealis/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/hanging-sql-queries/#post-880647)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
