https://bugzilla.wikimedia.org/show_bug.cgi?id=29287
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #11 from Roan Kattouw <[email protected]> 2011-06-07 20:45:00 UTC --- (In reply to comment #9) > You still hit a lot of row (640k). Notice the key length is 261! > That's not really relevant, is it? It just means the fields covered by the key are 261 bytes in total. > Maybe the index should be created using a shorter length (will have to figure > out a correct value). > > Maybe 24 character long which maps to: > '/trunk/phase3/includes/X' > '/trunk/extensions/XXXXXX' > > code_paths (cp_repo_id(24), cp_path) > > Or 35 characters to includes branches: > '/branches/REL1_18/phase3/includes/X' > '/branches/REL1_18/extensions/XXXXXX' > > code_paths (cp_repo_id(35), cp_path) > You could do that to make the index take less space, yes, but AFAIK MySQL isn't very smart when dealing with partial indexes like those, and will refuse to use the entire index if it can't be used to satisfy something completely. For that reason, I'm pretty sure it won't use the index for ORDER BY; it might use it for LIKE '/trunk/%' provided the prefix fits in the index, but I'm not sure. -- 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 [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
