Save 200 useless queries per category page view
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 16 Aug 2010 21:37:17 +0000 (21:37 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 16 Aug 2010 21:37:17 +0000 (21:37 +0000)
Yeah, I kind of wish this was a joke.  Granted, they're extremely fast
queries, and maybe they don't happen on all configs, but still.  And I'm
still seeing 148 queries per view, mostly Revision::fetchFromConds() . . .

RELEASE-NOTES
includes/CategoryPage.php

index 8cc23cb..2e72a5c 100644 (file)
@@ -293,6 +293,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 24714) Usage of {{#dateformat: }} in wikis without $wgUseDynamicDates no 
   longer pollutes the parser cache.
 * (bug 17031) Correct which characters the parser allows in tag attributes.
+* Save 200 useless queries on each category page view
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 5f42fe7..d9ef507 100644 (file)
@@ -276,7 +276,7 @@ class CategoryViewer {
 
                        $res = $dbr->select(
                                array( 'page', 'categorylinks', 'category' ),
-                               array( 'page_title', 'page_namespace', 'page_len',
+                               array( 'page_id', 'page_title', 'page_namespace', 'page_len',
                                        'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
                                        'cat_subcats', 'cat_pages', 'cat_files', 'cl_sortkey_prefix' ),
                                array( 'cl_to' => $this->title->getDBkey() ) + $extraConds,