On Thu, Jul 31, 2008 at 7:20 PM, <brion(a)svn.wikimedia.org> wrote:
> Log Message:
> -----------
> Revert r38302,38306 -- "Add an order by to the list of watched pages."
> This looks wrong -- an order by title wouldn't be indexed properly, and could be rather slow.
> . . .
> $sql = "SELECT wl_namespace, wl_title, page_id, page_len, page_is_redirect
> FROM {$watchlist} LEFT JOIN {$page} ON ( wl_namespace = page_namespace
> AND wl_title = page_title ) WHERE wl_user = {$uid}";
> - if ( !$dbr->implicitOrderby() ) {
> - $sql .= ' ORDER BY wl_title';
> - }
Maybe Greg meant ORDER BY wl_namespace, wl_title? That's the way it
would implicitly be retrieved in MySQL with our indexes. If that's
causing problems, that order should be made unconditionally explicit:
this isn't a case where it needs to be implicit for MySQL to be happy.
(If there is such a case. Not sure what this distinction is needed
for.)