Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have got rid of one of SQL problems but the story isn't over. Now hoster has detected another problematic SQL query and again threatens to disable the account. Can anyone advise on what's going on here and if there is anything that can be done to fix it?

Executed 107 min ago for 2 sec on Database --> my_db_name. 
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_author = 25 AND wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 20

Executed 98 min ago for 1 sec on Database --> my_db_name. 
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_author = 26 AND wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 20

Those users mentioned are just typical registered users with 'subscriber' level without any privileges (no installed user roles/capabilities plugins whatsoever). I've got 24 hrs to solve this stuff and I'm nearly desperate.

share|improve this question
1  
These queries are normal, nothing special. I would search for a better web hosting. –  toscho Apr 26 '13 at 21:24
    
Your host is complaining about 1 and 2 second queries? MySQL's default long_query_time is 10 seconds. Your host is really trying to enforce tight parameters. I would expect that their servers are "thin provisioned"-- ahem-- pretty aggressively. –  s_ha_dum Apr 26 '13 at 21:34
    
This is siteground.com/wordpress-hosting.htm which was recommended here: wplift.com/hosting This is a second relocation and I don't feel like doing again and going through all this moneyback stuff. Just is there anything I can do in this situatuion? –  Elixoid Apr 26 '13 at 21:49
    
I had something similar, I ended up altering the dashboard querying. My impact was significant on my server load and loading up the posts. Maybe you can create a small plugin to implement the code that's tailored to your situation? Here's my solution. –  NW Tech Apr 26 '13 at 21:58
    
I didn't quite get it about plugin. I don't use CPT, just regular posts and categories and tags. –  Elixoid Apr 26 '13 at 22:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.