3 ms·
>Both tables and indexes use the same b+-tree implementation based on Lehman and Yao (prev/next links on internal nodes). Tables in Postgres are not btree's th
by SigmundA 4y ago
>Both tables and indexes use the same b+-tree implementation based on Lehman and Yao (prev/next links on internal nodes).
Tables in Postgres are not btree's they are unordered heaps. The row id in the b-tree index points to a page number + item index in the heap.
A true clustered index would simply expose the index itself as a table without secondary heap storage, reducing I/O and storage space. Row visibility seems to complicate this in PG as index only scans may require checking the heap for visibility.