Re: Performance problems on a fairly big table with two

From: Richard Huxton <dev(at)archonet(dot)com>
To: rasmus(at)defero(dot)se
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance problems on a fairly big table with two
Date: 2003-09-05 16:39:32
Message-ID: 200309051739.32467.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Friday 05 September 2003 16:36, Rasmus Aveskogh wrote:
> Richard,
>
> Thanks a lot! You were right - the query parser "misunderstood"
> now() - '1 day'::interval and only used one of the indexes (as I already
> noticed).
>
> Actually all I had to do was to cast the result like this:
>
> (now() - '1 day'::interval)::date
>
> 75s is not between 10ms and 200ms.
>
> Thanks again!

Ah - good. You also want to be careful with differences between timestamp
with/without time zone etc.
--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mary Edie Meredith 2003-09-05 17:44:25 Re: [GENERAL] how to get accurate values in pg_statistic
Previous Message Ron Johnson 2003-09-05 16:09:18 Re: [PERFORM] Seq scan of table?