4 ms·
It seems like the query planner could perform this optimization, but also it seems like the index could maintain cardinality data to avoid requiring a scan/offs
by oconnore 4y ago
It seems like the query planner could perform this optimization, but also it seems like the index could maintain cardinality data to avoid requiring a scan/offset of ids.
If the index had cardinality metadata, it could jump directly to the leaf node containing the first row in the result set.
- Sesse__ 4y ago> If the index had cardinality metadata, it could jump directly to the leaf node containing the first row in the result set. It's difficult to maintain cardinality metadata in the face of MVCC, even for the table as a whole. Page-level or similar on an index would be even harder.