Previous: Lookup Tables, Up: Creating Tables and Roles [Contents][Index]
The location
table has an index that is clustered on the
time
column to improve the query performance of date range
queries. If the table becomes large and performance degrades, run the
psql cluster
command from time-to-time to re-cluster it. Note an
exclusive lock is placed on the table for the duration of the cluster
command execution.
See postgresql - Optimizing queries on a range of timestamps (two columns) - Database Administrators Stack Exchange for more information.