Hacker News new | ask | show | jobs
by yipenghuang 3125 days ago
A sequential scan could also be faster if the join selectivity is poor. As an extreme example say if every id in event_type appeared in prop_keys for a given app. So scanning the index repeatedly would be a waste of time since you would have to scan the table anyway.
1 comments

Which is the point of stats, right? To know when it's better to use an index vs just read the whole table because you need 50%+ of it anyway.