r25631 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25630‎ | r25631 | r25632 >
Date:11:26, 7 September 2007
Author:midom
Status:old
Tags:
Comment:
at large categories optimizer believes cl_timestamp is more efficient. why do we have that index at all - it is used just by wikinews...
Modified paths:
  • /trunk/extensions/BotQuery/query.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BotQuery/query.php
@@ -1115,7 +1115,7 @@
11161116 {
11171117 if ($wgContLang->getNsText($cpnamespace) === false)
11181118 $this->dieUsage( "cpnamespace is invalid", "cp_badnamespace" );
1119 - $tables[] = 'page';
 1119+ array_unshift($tables,'page');
11201120 $conds[] = 'cl_from = page_id';
11211121 $conds['page_namespace'] = $cpnamespace;
11221122 }
@@ -1134,7 +1134,7 @@
11351135 $fields,
11361136 $conds,
11371137 __METHOD__,
1138 - array( 'ORDER BY' => 'cl_sortkey', 'LIMIT' => $cplimit+1 ));
 1138+ array( 'ORDER BY' => 'cl_sortkey', 'LIMIT' => $cplimit+1, 'USE INDEX' => 'cl_sortkey' ));
11391139 $this->endDbProfiling( $prop );
11401140
11411141 $count = 0;

Status & tagging log