From: Aryeh Gregor Date: Mon, 16 Aug 2010 21:37:17 +0000 (+0000) Subject: Save 200 useless queries per category page view X-Git-Tag: 1.31.0-rc.0~35467 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=3494f651009b83cb34ea7ce4a17552f9c0e9affb;p=lhc%2Fweb%2Fwiklou.git Save 200 useless queries per category page view 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() . . . --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8cc23cb860..2e72a5cbcb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 5f42fe7f92..d9ef5077de 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -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,