Re: Table Clustering & Time Range Queries - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Table Clustering & Time Range Queries
Date
Msg-id 4AE06B41020000250002BE0A@gw.wicourts.gov
Whole thread Raw
In response to Table Clustering & Time Range Queries  (Kevin Buckham <kbuckham@applocation.net>)
Responses Re: Table Clustering & Time Range Queries
List pgsql-performance
Kevin Buckham <kbuckham@applocation.net> wrote:

> Our primary location table is clustered by "reporttime" (bigint).
> Many of the queries we need to perform are of the nature : "get me
> all positions from a given device for yesterday".  Similar queries
> are "get me the most recent 10 positions from a given device".

Have you looked at table partitioning?  You would then only need to
cluster the most recent partition or two.  I *seems* like a good fit
for your application.

http://www.postgresql.org/docs/8.4/interactive/ddl-partitioning.html

-Kevin

pgsql-performance by date:

Previous
From: Kevin Buckham
Date:
Subject: Table Clustering & Time Range Queries
Next
From: Scott Carey
Date:
Subject: Re: Table Clustering & Time Range Queries