https://bugzilla.wikimedia.org/show_bug.cgi?id=20186
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #7 from Roan Kattouw <[email protected]> 2009-12-01 13:09:05 UTC --- (In reply to comment #6) > What about a paged interface (like ordinary history or contribs) for pages > with > many revisions or much RevDelete activity? > > Is "WHERE (pageid=X AND bitflags > 0)" really that much slower or more > demanding on the servers, than "WHERE (pageid=X)"? > You'd be doing WHERE rev_page=X AND rev_deleted != 0, and yes, that's slower, because there's no index on rev_deleted and rows with rev_deleted != 0 are relatively rare. What the DBMS will end up doing is: * retrieve rows with rev_page=X using an index (fast) * iterate over these rows ** if the row has rev_deleted !=0 (rare), add it to the result set. If the result set is full (50 or 500 results), stop ** if the row has rev_deleted = 0 (common), ignore it This'll need to examine a lot of rows because deleted revisions are rare. On the other hand, queries with WHERE rev_deleted = 0 , while not indexed, are relatively fast because rev_deleted=0 matches most rows. -- 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
