4 ms·
Yes you can manually re-order a table, with locking, but that's really not the same thing as enforcing in on INSERT/UPDATE.
by ssmoot 11y ago
Yes you can manually re-order a table, with locking, but that's really not the same thing as enforcing in on INSERT/UPDATE.
- Jweb_Guru 11y agoClustered index is something it would be nice for Postgres to have, but it would be a lot of work to implement and it's certainly not always a performance win. Looking up by that index is very fast, but looking up by a secondary index may have to traverse a second btree (it cannot point directly at data on disk because its location is tied to the clustered index). And of course there's quite a bit of overhead for transactions and modification operations. In practice, you can recover many of the advantages of clustered indexes in PostgreSQL (along with the disadvantages) with a covering index eligible for https://wiki.postgresql.org/wiki/Index-only_scans https://wiki.postgresql.org/wiki/Index-only_scans.