From: Roan Kattouw Date: Mon, 7 Jul 2008 13:08:03 +0000 (+0000) Subject: Killing filesort in prop={links,templatelinks} when {pl,tl}namespace isn't set. X-Git-Tag: 1.31.0-rc.0~46661 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=00d4f3c482978b3cc82e5394655d5f7ea8aba5f3;p=lhc%2Fweb%2Fwiklou.git Killing filesort in prop={links,templatelinks} when {pl,tl}namespace isn't set. --- diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php index 69805411c4..73a2ad8a79 100644 --- a/includes/api/ApiQueryLinks.php +++ b/includes/api/ApiQueryLinks.php @@ -93,7 +93,8 @@ class ApiQueryLinks extends ApiQueryGeneratorBase { $order = array(); if(count($this->getPageSet()->getGoodTitles()) != 1) $order[] = "{$this->prefix}_from"; - // pl_namespace is always constant + if(!isset($params['namespace'])) + $order[] = "{$this->prefix}_namespace"; $order[] = "{$this->prefix}_title"; $this->addOption('ORDER BY', implode(", ", $order)); $this->addOption('USE INDEX', "{$this->prefix}_from");