Re: Table Clustering & Time Range Queries

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <kbuckham(at)applocation(dot)net>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Table Clustering & Time Range Queries
Date: 2009-10-22 19:25:05
Message-ID: 4AE06B41020000250002BE0A@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Kevin Buckham <kbuckham(at)applocation(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2009-10-22 21:33:35 Re: Table Clustering & Time Range Queries
Previous Message Kevin Grittner 2009-10-22 18:51:30 Re: Queryplan within FTS/GIN index -search.