From: Richard Huxton <dev@archonet.com>
To: rasmus@defero.se
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance problems on a fairly big table with two
Date: Fri, 5 Sep 2003 17:39:32 +0100
Message-ID: <200309051739.32467.dev@archonet.com> (raw)
In-Reply-To: <1081.62.119.108.236.1062776210.squirrel@www.defero.se>
References: <1564.62.119.108.236.1062716026.squirrel@www.defero.se>
<200309050934.52082.dev@archonet.com>
<1081.62.119.108.236.1062776210.squirrel@www.defero.se>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: dev@archonet.com, rasmus@defero.se
Subject: Re: Performance problems on a fairly big table with two
In-Reply-To: <200309051739.32467.dev@archonet.com>
References: <1564.62.119.108.236.1062716026.squirrel@www.defero.se> <200309050934.52082.dev@archonet.com> <1081.62.119.108.236.1062776210.squirrel@www.defero.se> <200309051739.32467.dev@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox