How PostgreSQL Deduplicates B-Tree Entries
Every index is a lie about multiplicity. A CREATE INDEX on a boolean column produces a structure in which, logically, there are only two distinct keys — but the index has to be …
Every index is a lie about multiplicity. A CREATE INDEX on a boolean column produces a structure in which, logically, there are only two distinct keys — but the index has to be …
A B-tree index on (a, b) is a sorted list of pairs. Sorting by a first means all the rows with a = 1 are contiguous, all the rows with a = 2 are contiguous, and so on — and within …