From: Aaron Schulz Date: Tue, 30 Dec 2008 12:55:41 +0000 (+0000) Subject: Add index clause, particularly for if an extension does a join or something X-Git-Tag: 1.31.0-rc.0~43700 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=178bc985ad32b5bccd068446a4b2bc4b2f6b060f;p=lhc%2Fweb%2Fwiklou.git Add index clause, particularly for if an extension does a join or something --- 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 ) );