r45182 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45181‎ | r45182 | r45183 >
Date:12:55, 30 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Add index clause, particularly for if an extension does a join or something
Modified paths:
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -643,6 +643,7 @@
644644 // Search backwards for time > x queries
645645 $order = (!$start && $end !== null) ? "ASC" : "DESC";
646646 $opts['ORDER BY'] = "oi_timestamp $order";
 647+ $opts['USE INDEX'] = array('oldimage' => 'oi_name_timestamp');
647648
648649 wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields,
649650 &$conds, &$opts, &$join_conds ) );

Status & tagging log