• Hi, where is the below queries executed by default on single page and home page?

    SELECT option_name, option_value FROM wp_options WHERE autoload = ‘yes’

    SELECT p.* FROM wp_posts AS p WHERE p.post_date < ‘2011-08-28 10:54:22’ AND p.post_type = ‘post’ AND p.post_status = ‘publish’ ORDER BY p.post_date DESC LIMIT 1

    SELECT p.* FROM wp_posts AS p WHERE p.post_date > ‘2011-08-28 10:54:22’ AND p.post_type = ‘post’ AND p.post_status = ‘publish’ ORDER BY p.post_date ASC LIMIT 1

    SELECT ID, post_name, post_parent FROM wp_posts WHERE post_name = ‘testing’ AND (post_type = ‘page’ OR post_type = ‘attachment’)

    I am using twentyten theme.

    I turned off all the page code but still could see the queries being executed.

    appreciate your help in this regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Those queries are generating your web pages. No queries – no pages.

    Thread Starter recsomu

    (@recsomu)

    is there anyway that I can stop executing date comparision as it is taking more time to display pages.

    p.post_date > ‘2011-08-28 10:54:22’

    Don’t have any date-based archives on your site? Seriously, if such simple queries are creating performance issues on your site, then you need to start looking for a new host.

    Thread Starter recsomu

    (@recsomu)

    Yes, I don’t have any date based archives. Just the category pages and post detailed pages.

    Just wanted to stop all unwanted queries.

    My goal is to bring the site that can show the result within 1 second.Right now it is taking 3 seconds.

    I applied the caching mechanism etc.

    Not sure why the date based query should be executed on post detailed page?

    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.

    Thread Starter recsomu

    (@recsomu)

    Thanks esmi. I really appreciate your quick reply in this regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Where is this Queries executed? How can I turn off them?’ is closed to new replies.