Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't believe that the Primary Key affects the physical ordering of records in PostgreSQL.

Primary Key is implemented as a unique index coupled with a not null constraint. It's essentially syntactic sugar.



To elaborate, even if you do call CLUSTER[1] to enforce a physical ordering, the primary key is not the default (there is no default).

1. http://www.postgresql.org/docs/9.5/static/sql-cluster.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: