About clustered index in postgres

后端 未结 6 1045
说谎
说谎 2020-12-04 17:54

I\'m using psql to access a postgres database. When viewing the metadata of a table, is there any way to see whether an index of a table is a clustered index?

I hear

6条回答
  •  日久生厌
    2020-12-04 18:06

    is there any way to see whether an index of a table is a clustered index

    PostgreSQL does not have a clustered index, so you won't be able to see them.

    I heard that the PRIMARY KEY of a table is automatically associated with a clustered index, is it true?

    No, that's not true (see above)

    You can manually cluster a table along an index, but this is nothing that will be maintained automatically (as e.g. with SQL Server's clustered indexes).

    For more details, see the description of the CLUSTER command in the manual.

提交回复
热议问题