From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx]
On Behalf Of Nicolas Grilly On Tue, Aug 30, 2016 at 8:17 PM, Kenneth Marshall <ktm@xxxxxxxx> wrote:
In DB2, it seems possible to define a "clustering index" that determines how rows are physically ordered in the "table space" (the heap). The documentation says: "When a table has a clustering index, an INSERT statement causes DB2 to insert the records as nearly as possible in the order of their index values."
Don’t know about plans to implement clustered indexes in PostgreSQL. Not sure if this was mentioned, MS SQL Server has clustered indexes, where heap row is just stored on the leaf level of the index. Oracle also has similar feature: IOT, Index Organized Table. It seems to me (may be I’m wrong), that in PostgreSQL it should be much harder to implement clustered index (with the heap row stored in the index leaf) because
of the way how MVCC implemented: multiple row versions are stored in the table itself (e.g. Oracle for that purpose keeps table “clean” and stores multiple row versions in UNDO tablespace/segment). Regards, Igor Neyman |