May 2017
Beginner
416 pages
10h 37m
English
In PostgreSQL, there is a command called CLUSTER that allows us to rewrite a table in a desired order. It is possible to point to an index and store data in the same order as the index:
test=# \h CLUSTER Command: CLUSTER Description: cluster a table according to an index Syntax: CLUSTER [VERBOSE] table_name [ USING index_name ] CLUSTER [VERBOSE]
The CLUSTER command has been around for many years and serves its purpose well. But, there are some things to consider before blindly running it on a production system:
Read now
Unlock full access