When faced with a problem you do not understand, do any part of it you do understand, then look at it again
“
| — | Grady Booch (citing Heinlein) |
| — | Grady Booch (citing Heinlein) |
| — | Ray Kurzweil |
| — | John Graham-Cumming in Some things I’ve learnt about programming |
While researching why SELECT COUNT(*) is slow on PostgreSQL, i found this nice rule-of-thumb for B-tree (the most common type of database index) efficiency:
10% selectivity is the minimum selectivity necessary for a b-tree index to be helpful.
Where selectivity = unique index values / total number records