Optimize Postgres query on timestamp range

CLUSTER If you intend to use CLUSTER, the displayed syntax is invalid. create CLUSTER ticket USING ticket_1_idx; Run once: CLUSTER ticket USING ticket_1_idx; This can help a lot with bigger result sets. Not so much for a single or few rows returned. Postgres remembers which index to use for subsequent calls. If your table isn’t … Read more