Title: query excerpt causing MySQL
Last modified: August 30, 2016

---

# query excerpt causing MySQL

 *  [mrbkr86](https://wordpress.org/support/users/mrbkr86/)
 * (@mrbkr86)
 * [11 years ago](https://wordpress.org/support/topic/query-excerpt-causing-mysql/)
 * Hello all from last few weeks my website was very slow and after few days my 
   hosting provider have suspended my hosting. They told me that
 * “It was quite a bit worse this time – the queries were backed up, some for over
   10 minutes, and in the end it was causing MySQL to use about 800% of the server’s
   CPU (8 full cores) – so we had to suspend it.
    “
 * Here is the query excerpt we have:
 * Copying to tmp table | SELECT DISTINCT post_title, ID, post_type, post_name
    
   FROM wp_posts wposts LEFT JOIN wp_postmet
 * This was taking 10-20 seconds to execute.
 * I am not a wordpress developer so i need your help guys :/

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

 *  [Lalit Nagrath](https://wordpress.org/support/users/laliz/)
 * (@laliz)
 * [11 years ago](https://wordpress.org/support/topic/query-excerpt-causing-mysql/#post-6243619)
 * try this solution
 * [http://dba.stackexchange.com/questions/7806/copying-to-tmp-table-extremely-slow](http://dba.stackexchange.com/questions/7806/copying-to-tmp-table-extremely-slow)
 *  Thread Starter [mrbkr86](https://wordpress.org/support/users/mrbkr86/)
 * (@mrbkr86)
 * [11 years ago](https://wordpress.org/support/topic/query-excerpt-causing-mysql/#post-6243763)
 * not working… 🙁
 * my hosting provider replied
    “I am afraid this is not possible as it involves
   changing the server config globally, the solution shouldn’t involve the changing
   of server settings anyway, it needs to be optimising the query itself to run 
   faster.”
 * “I’ve had a few of our guys look at the query and they do not think it’s possible
   to optimise, it’s simply a bad query. I do not think this query would be part
   of the standard WordPress install, so I’m guessing it’s a plugin of some kind?
   it so you could simply disable this plugin and find a better alternative.”
 *  [cvladan](https://wordpress.org/support/users/cvladan/)
 * (@cvladan)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/query-excerpt-causing-mysql/#post-6243890)
 * I also discovered the same slow query log.
 * And I detected the problem in this badly written plugin: [https://wordpress.org/plugins/seo-automatic-links/](https://wordpress.org/plugins/seo-automatic-links/)

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

The topic ‘query excerpt causing MySQL’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [cvladan](https://wordpress.org/support/users/cvladan/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/query-excerpt-causing-mysql/#post-6243890)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
