2011/9/26 Platonides <Platonides(a)gmail.com>om>:
Wouldn't it be able to use the index in rev_id to
return it in O(1) ?
It takes ages in the toolserver view, but I guess it would be the
428660376 rows it shows in the explain.
No. This works for the MAX(), but not for
the COUNT(), where it
literally has to count row-by-row. Since there are gaps in the revids,
MAX(rev_id) > COUNT(*).
Roan Kattouw (Catrope)