Give usertext so that user,timestamp index can be used. Should require less to scan...
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 17 Feb 2008 20:13:00 +0000 (20:13 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 17 Feb 2008 20:13:00 +0000 (20:13 +0000)
includes/DifferenceEngine.php

index 349c88e..12f3b23 100644 (file)
@@ -169,12 +169,12 @@ CONTROL;
                                $db = wfGetDB( DB_SLAVE );
                                $change = RecentChange::newFromConds(
                                        array(
-                                               // Add redundant timestamp condition so we can use the
-                                               // existing index
+                                               // Add redundant user,timestamp condition so we can use the existing index
+                                               'rc_user_text'  => $this->mNewRev->getRawUserText(),
                                                'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ),
                                                'rc_this_oldid' => $this->mNewid,
                                                'rc_last_oldid' => $this->mOldid,
-                                               'rc_patrolled' => 0,
+                                               'rc_patrolled' => 0
                                        ),
                                        __METHOD__
                                );