Sql-server – Postgres heap vs SQL Server clustered index

clustered-indexdatabase-internalsheappostgresqlsql server

I am transitioning from SQL Server to Postgres, and one of the biggest things for me to digest is the non-existence of the "clustered key" that sorts the data in Postgres.

Can someone share their thoughts on how Postgres avoided the need for an internally sorted dataset and how it works with large heap tables and still supply exceptional performance?

Best Answer

You can try pg_repack extension to cluster online with less locking