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: (view raw, whole thread or download thread mbox)
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


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-2017 The PostgreSQL Global Development Group