Re: Query tuning - Mailing list pgsql-performance

From Віталій Тимчишин
Subject Re: Query tuning
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: Query tuning  (Kevin Kempter <[email protected]>)
List pgsql-performance


2009/8/19 Kevin Kempter <[email protected]>

We do have an index on url_hits.time

not sure why timestamps were not used, I was not here for the design phase.

What's type of time column? I don't like it casts it to double in explain. If it is integer, may be you need to change

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

to

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

for the index to be used?

pgsql-performance by date:

Previous
From: Fabio La Farcioli
Date:
Subject: Re: Number of tables
Next
From: Ivan Voras
Date:
Subject: Re: PG 8.3 and server load