https://bugzilla.wikimedia.org/show_bug.cgi?id=2170
--- Comment #16 from Aryeh Gregor <simetrical+wikib...@gmail.com> 2010-04-15 15:08:36 UTC --- AFAICT, that will have to scan the entire page_random index in the worst case, e.g., if there are no actual pages in the category. You left out part of the EXPLAIN -- this is full thing for me on enwiki (on toolserver). *************************** 1. row *************************** id: 1 select_type: SIMPLE table: page type: range possible_keys: page_random key: page_random key_len: 8 ref: NULL rows: 10001064 Extra: Using where *************************** 2. row *************************** id: 1 select_type: SIMPLE table: categorylinks type: eq_ref possible_keys: cl_from,cl_timestamp,cl_sortkey key: cl_from key_len: 261 ref: enwiki.page.page_id,const rows: 1 Extra: Using where; Using index Note rows: 10001064. Try running that on a large database with 'GFDL' replaced by 'Nonexistent category' and you'll see it takes forever. It's O(N) in number of pages in the worst case, only acceptable for very small sites. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l