Index: trunk/extensions/BotQuery/query.php |
— | — | @@ -1115,7 +1115,7 @@ |
1116 | 1116 | { |
1117 | 1117 | if ($wgContLang->getNsText($cpnamespace) === false) |
1118 | 1118 | $this->dieUsage( "cpnamespace is invalid", "cp_badnamespace" ); |
1119 | | - $tables[] = 'page'; |
| 1119 | + array_unshift($tables,'page'); |
1120 | 1120 | $conds[] = 'cl_from = page_id'; |
1121 | 1121 | $conds['page_namespace'] = $cpnamespace; |
1122 | 1122 | } |
— | — | @@ -1134,7 +1134,7 @@ |
1135 | 1135 | $fields, |
1136 | 1136 | $conds, |
1137 | 1137 | __METHOD__, |
1138 | | - array( 'ORDER BY' => 'cl_sortkey', 'LIMIT' => $cplimit+1 )); |
| 1138 | + array( 'ORDER BY' => 'cl_sortkey', 'LIMIT' => $cplimit+1, 'USE INDEX' => 'cl_sortkey' )); |
1139 | 1139 | $this->endDbProfiling( $prop ); |
1140 | 1140 | |
1141 | 1141 | $count = 0; |