https://bugzilla.wikimedia.org/show_bug.cgi?id=27340

Roan Kattouw <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Roan Kattouw <[email protected]> 2011-03-13 20:47:13 
UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > Ok, poking at this.
> > 
> > If we just filter by the cat_pages, it's fine. If we then order by anything
> > (cat_title or cat_pages), we create a filesort.
> > 
> > This basically means we can't do both pages and title filtering together...
> > (Would need to be mutually exclusive)
> > 
> > Though, I just noticed, if we do WHERE cl_title >= something, and order by, 
> > it
> > filesorts....
> 
> Seemingly, just on the version of mysql my vm is running. FFS
Depends on which index is chosen. When you use cl_title >= 'foo' with ORDER BY
cat_pages , MySQL can either use the cat_pages index for ordering and resolve
the WHERE by scanning rows and dropping them if they don't satisfy the
condition, or it can use the cl_title index for quickly obtaining all rows that
satisfy the WHERE clause then filesort that.

For this reason, the code committed for fixing this bug is likely to produce
inefficient queries. I'll comment on that in more detail on CodeReview.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to