How does PostgreSQL physically order new records on disk (after a cluster on primary key)?
-
31-10-2019 - |
Question
Need to know how PostgreSQL orders records on disk. In this case, I would like to take advantage of index combination as stated in the docs, which as I understand uses bitmaps to get matching rows and returns them according to their physical location. The table in question has been clustered by its primary key.
As I understand it, PostgreSQL does not automatically continue doing clustering after a clustering is finished (although it does remember that it clustered according to a certain index). Now, since this is the primary key, I wonder if the physical storage order would be according to that (which if true I would like to use to our advantage for a specific query).
In summary, how does PostgreSQL order its new records, especially after clustering?
Thanks very much!
No correct solution