From: Aryeh Gregor Date: Thu, 10 Jul 2008 18:05:52 +0000 (+0000) Subject: Add overly wordy comment explaining why logs can't be filtered by prefix in $wgMiserM... X-Git-Tag: 1.31.0-rc.0~46565 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=779b716bac729b4ca38abe29f00f8768f02731f5;p=lhc%2Fweb%2Fwiklou.git Add overly wordy comment explaining why logs can't be filtered by prefix in $wgMiserMode, since I keep on forgetting. --- diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index d9635418c6..d49f636b4c 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -504,6 +504,17 @@ class LogPager extends ReverseChronologicalPager { $this->title = $title->getPrefixedText(); $ns = $title->getNamespace(); + # Using the (log_namespace, log_title, log_timestamp) index with a + # range scan (LIKE) on the first two parts, instead of simple equality, + # makes it unusable for sorting. Sorted retrieval using another index + # would be possible, but then we might have to scan arbitrarily many + # nodes of that index. Therefore, we need to avoid this if $wgMiserMode + # is on. + # + # This is not a problem with simple title matches, because then we can + # use the page_time index. That should have no more than a few hundred + # log entries for even the busiest pages, so it can be safely scanned + # in full to satisfy an impossible condition on user or similar. if( $pattern && !$wgMiserMode ) { # use escapeLike to avoid expensive search patterns like 't%st%' $safetitle = $this->mDb->escapeLike( $title->getDBkey() );