[resolved] Looking for source of SQL query (3 posts)

  1. pixelgeek
    Posted 9 years ago #

    I am attempting to track down the source of a series of slow queries on my WordPress site but oddly can't find the file that a query is in by doing a multi-file search in BBEdit.

    The query string I am looking for is

    SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1...

    but I can't locate it anywhere.

    I think it is an rss related query but wasn't able to find it at all

    I've seen the query in the support section in relation to a few plugins (none of which I have enabled)

    The calls are starting to be a bit of a load on my server and I want to track down where this is coming from


  2. whooami
    Posted 9 years ago #

    take a look at wp-includes/query.php @ lines 981-985

    assuming that you're looking at 2.1.3 files, your line numbers might be the same, if not, they're close.

  3. pixelgeek
    Posted 9 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic