What is the purpose of the CLUSTER command in PostgreSQL?

Advanced SQL Developer Hard

Advanced SQL Developer — Hard

What is the purpose of the CLUSTER command in PostgreSQL?

Key points

  • CLUSTER reorganizes table data based on an index
  • Improves performance for range scans on that index
  • Does not create a new index, but reorders existing data
  • Helps optimize query performance by improving data locality

Ready to go further?

Related questions