Hi!

Would it make sense to have an engine-level option to tell the
optimizer to prioritize index use at all times? Something along the
line of HA_PRIORITIZE_INDEX.

I'm saying this because the relationship between
Cursor::records_in_range() and HA_READ_RANGE seems important to
effectively perform range scans at the moment. I tried purposely
returning a constant small cost factor in records_in_range() but it
seems that the range search will fail if the number of estimated rows
(in my case a total lie) is significantly smaller than the number of
actual rows in the table. If I don't set, HA_READ_RANGE then it seems
Drizzle will resort to a table scan (despite knowing that
'possible_keys' exist in EXPLAIN).

Preferably, I don't want to count through the number of rows in a
range for the optimizer on every simple query. Although... a
completely dishonest implementation of records_in_range() would dirty
the EXPLAIN statement result. So there is definitely a downside to
what I was experimenting with.

It would be great to hear what you all think :)

- Toru

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to