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.
Eh? It indexes just fine:
QUERY PLAN ------------------------------------------------------------------ Sort (actual time=16.137..16.350 rows=538 loops=1) Sort Key: page.page_title Sort Method: quicksort Memory: 76kB -> Nested Loop Left Join (actual time=0.460..14.734 rows=538 loops=1) Join Filter: (watchlist.wl_namespace = page.page_namespace) -> Bitmap Heap Scan on watchlist (actual time=0.379..2.605 rows=538 loops=1) Recheck Cond: (wl_user = 345) -> Bitmap Index Scan on watchlist_user (actual time=0.298..0.298 rows=538 loops=1) Index Cond: (wl_user = 345) -> Index Scan using page_title on page (actual time=0.015..0.019 rows=2 loops=538) Index Cond: (watchlist.wl_title = page.page_title) Total runtime: 16.782 ms