Better HN
topnewbestaskshowjobs
Log inSign up

yipenghuang

6 karma · joined Nov 23, 2017 (9y ago) · 2 submissions

Submissions

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

The time complexity for sequential scan takes O(r), because every row must be read once. Of course rows are made up of columns so you can also specify it as O(rc) where c is the average column length.