Re: Optimize date query for large child tables: GiST or GIN?

From: David Jarvis <thangalin(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Optimize date query for large child tables: GiST or GIN?
Date: 2010-06-01 18:01:22
Message-ID: AANLkTimj8bGLBr4trW8JMYe-HPdV6bjWtB_y79qOquVL@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sorry, Alvaro.

I was contemplating using a GIN or GiST index as a way of optimizing the
query.

Instead, I found that re-inserting the data in order of station ID (the
primary look-up column) and then CLUSTER'ing on the station ID, taken date,
and category index increased the speed by an order of magnitude.

I might be able to drop the station/taken/category index in favour of the
simple station index and CLUSTER on that, instead (saving plenty of disk
space). Either way, it's fast right now so I'm not keen to try and make it
much faster.

Dave

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2010-06-01 19:00:26 Re: Optimize date query for large child tables: GiST or GIN?
Previous Message Jeres Caldeira Gomes 2010-06-01 17:47:15 PgAdmin iii - Explain.