0

I have a SQL query consumes a lot of CPU/MySQL time for my Wordpress site. The syntax/sample is following:

SET timestamp=XXX;
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE XXX=XXX AND wp_posts.post_type =     'XXX' AND (wp_posts.post_status = 'XXX') ORDER BY wp_posts.post_date DESC LIMIT XXX, XXX;

SET timestamp=1394317687;
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') ORDER BY wp_posts.post_date DESC LIMIT 5190, 10;

Looks like it's "paging" related because it limits 10 posts in the query (10 is the number of posts per page). It's not done by the users because the site is not that active. I am wondering if it's possible that Google bots is trying to index all my pages?

Any advise & suggestion is very appreciated. Thanks.

Joe Huang
  • 6,296
  • 7
  • 48
  • 81

1 Answers1

0

You should review your http server logs to see if there are patterns of requests, or requests that report a User-Agent associated with a search engine bot crawling your site.

You can also do this with code: how to detect search engine bots with php?

Of course, User-Agent can be faked by a bad-behaving bot, but it's more likely an ordinary bot or a search engine, innocently following every link on your site.

Or you can find a Wordpress plugin to do the detective work for you, for example: http://wordpress.org/plugins/jaspreetchahals-wordpress-bot-detector-lite/ (I have not used that plugin, I just found it).

You can also configure your site to instruct bots not to crawl your site: https://yoast.com/prevent-site-being-indexed/

Community
  • 1
  • 1
Bill Karwin
  • 538,548
  • 86
  • 673
  • 828