Re: Query tuning

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Kevin Kempter <kevink(at)consistentstate(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query tuning
Date: 2009-08-19 16:38:08
Message-ID: 2f4958ff0908190938l683b2ed4w94b6d36361307e35@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

that seems to be the killer:

and time >= extract ('epoch' from timestamp '2009-08-12')
and time < extract ('epoch' from timestamp '2009-08-13' )

You probably need an index on time/epoch:

CREATE INDEX foo ON table(extract ('epoch' from timestamp time );

or something like that, vacuum analyze and retry.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2009-08-19 17:17:26 Re: Query tuning
Previous Message Kevin Kempter 2009-08-19 16:28:41 Query tuning