What index anatomy forbids
Which combinations can no index give, and what does each escape cost?
What the anatomy forbids
- You cannot have two clustered orders.
- You cannot make an index free on the write path, only smaller, narrower or deferred.
- You cannot get index-only scans without duplicating columns.
- You cannot index an expression whose definition you cannot pin down.
- You cannot prune with a zone map what you have not clustered.
- You cannot use a partial index the planner cannot prove applies.
The escapes and their prices
- Covering escapes the fetch and pays in duplication.
- Partial escapes the maintenance and pays in a proof obligation.
- Sparse escapes the space and pays in a required sort order.
- Bitmap escapes the selectivity crossover and pays in update cost.
- Skip scan escapes the leftmost rule and pays in leading-column cardinality.
- Late binding escapes rewrite-on-move and pays a descent per lookup.