Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

Next:From: Scott CareyDate: 2009-08-19 17:17:26
Subject: Re: Query tuning
Previous:From: Kevin KempterDate: 2009-08-19 16:28:41
Subject: Query tuning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group