[wp-trac] [WordPress Trac] #11399: clean_post_cache() generates enormous amounts of queries on sites with lots of pages, revisions or attachments
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 11 16:12:04 UTC 2009
#11399: clean_post_cache() generates enormous amounts of queries on sites with lots
of pages, revisions or attachments
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Optimization | Version: 2.9
Severity: normal | Keywords: dev-feedback
-------------------------------+--------------------------------------------
It's recursively doing queries such as this one:
SELECT ID FROM www_posts WHERE post_parent = 592
For one thing it's not checking if has already been run for a particular
post/page. If a root page gets cleaned up several times during the same
page row, we re-do the whole series of pages, attachments, revisions and
what not all over again.
It prompted another thought, too: how important is it to keep non-
published data in memcached? It seems to me that we could change
wp_cache_add(), etc. in such a way that the non-published data remains
available over in the posts bucket, without getting shoved into memcached.
Were we to do so, we could change the above query so it adds a constraint
on post_status. That's a lot less queries.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11399>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list