Forums

Help tracing a slow query please (2 posts)

  1. stonecoldtea
    Member
    Posted 6 months ago #

    Hi All,

    I'm trying to track down what could be causing the following query in the mysql slow log:

    SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND (post_mime_type LIKE 'image/%') AND wp_posts.post_type = 'attachment' AND (wp_posts.post_status = 'inherit') ORDER BY RAND() DESC LIMIT 0, 1;

    The site has a lot of posts but no plugins that should be querying a random post.

    Any help/pointers greatly appreciated!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

Reply

You must log in to post.

About this Topic