From 178bc985ad32b5bccd068446a4b2bc4b2f6b060f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 30 Dec 2008 12:55:41 +0000 Subject: [PATCH] Add index clause, particularly for if an extension does a join or something --- includes/filerepo/LocalFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 9adac91fdb..4b0f935dba 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -643,6 +643,7 @@ class LocalFile extends File // Search backwards for time > x queries $order = (!$start && $end !== null) ? "ASC" : "DESC"; $opts['ORDER BY'] = "oi_timestamp $order"; + $opts['USE INDEX'] = array('oldimage' => 'oi_name_timestamp'); wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields, &$conds, &$opts, &$join_conds ) ); -- 2.20.1