3 ms·
It does tell the query planner it can use it though.
by lazide 5y ago
It does tell the query planner it can use it though.
- deleted 5y ago[deleted]
- SpicyLemonZest 5y ago"Doesn't know it can use" in this context means the system probably doesn't know how to use it, even if a hint suggests it should.
- lazide 5y agoMany times it's not that, or specifically that type of behavior doesn't cause the weird 'something randomly blows up' type problems. It's that it is using index size vs on disk size or something for specific query values and deciding to do something kind of dumb, like a full range scan, because it isn't taking into account the disk data is on... well disk, and the index is already loaded into memory because of other queries. Semi-locking it to known good indexes or whatever, or at least overriding it's attempt to be smart, helps usually in cases like this as it cuts out the long tail behavior and makes the whole system more predictable.
- mike_hock 5y agoYes. But in this case it isn't that.