vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r23551: LJSUP-14841: [internal] remove "use inde...

Committer: vad
LJSUP-14841: [internal] remove "use index" hint from query to subs table that was added during temporary db slowness
U   trunk/cgi-bin/LJ/Event.pm
Modified: trunk/cgi-bin/LJ/Event.pm
===================================================================
--- trunk/cgi-bin/LJ/Event.pm	2013-01-17 07:46:08 UTC (rev 23550)
+++ trunk/cgi-bin/LJ/Event.pm	2013-01-17 08:54:41 UTC (rev 23551)
@@ -689,14 +689,11 @@
             # FIXME: journals are only on one cluster! split jidlist based on cluster
             my $jidlist = join(",", @wildcards_from);
 
-            ## Strictly specify USE INDEX(PRIMARY) hint.
-            ## Otherwise mysql query planner is acting out and query takes inexcusable amount of time.
             my $sth = $udbh->prepare(qq{
                 SELECT
                     userid, subid, is_dirty, journalid, etypeid,
                     arg1, arg2, ntypeid, createtime, expiretime, flags
                 FROM subs
-                USE INDEX(PRIMARY)
                 WHERE etypeid=? AND journalid=0 $and_enabled
                     AND userid IN ($jidlist)
             });

Tags: livejournal, pm, vad, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments