Re:PostgreSQL B-Tree index deduplication
by pgaddict on Monday September 07, 2020 @08:20AM
(#24398911)
Interesting question.
Considering how different the gid and btree indexes are, I'd say it's very different. GIN essentially builds a posting list for each value in the column, and compresses that (which might be seen as a kind of a bitmap index). OTOH btree deduplication simply compares index keys that end up on the same leaf page. So there's on "global" index compression, it's much more localized.
But I suppose Peter and Anastasia have more thoughts on this ...
Considering how different the gid and btree indexes are, I'd say it's very different. GIN essentially builds a posting list for each value in the column, and compresses that (which might be seen as a kind of a bitmap index). OTOH btree deduplication simply compares index keys that end up on the same leaf page. So there's on "global" index compression, it's much more localized.
But I suppose Peter and Anastasia have more thoughts on this ...