[wp-trac] [WordPress Trac] #7443: Having many Pages with the same
stub causes excess queries
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 30 22:31:07 GMT 2008
#7443: Having many Pages with the same stub causes excess queries
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.9
Component: Optimization | Version: 2.6
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
If you have many Pages with the same stub, many queries can be required to
view the Page. This is because it first grabs all Pages with the stub (1
query). Then it loops through each result and queries the details for that
result's parent looking for a match.
Instead, why not turn the IDs to search for into a list and grab all of
those parents at once? It's a little heavier query, but it's one query
rather than tons. Then you can loop through those results checking via
PHP.
Thoughts? Am I missing something?
--
Ticket URL: <http://trac.wordpress.org/ticket/7443>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list