From: | Edmund Dengler <edmundd(at)eSentire(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Performance of query (fwd) |
Date: | 2003-06-11 20:06:04 |
Message-ID: | Pine.BSO.4.44.0306111602340.15310-100000@cyclops4.esentire.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Whoops! Thanks! Tried it, and it did return very fast (about a second and
a half). Things switched from a "merge join" to a "nested loop".
Regards,
Ed
On Wed, 11 Jun 2003, Tom Lane wrote:
> Edmund Dengler <edmundd(at)eSentire(dot)com> writes:
> > Ok, tried it with a constant. No improvements. The estimator is still very
> > high.
>
> > where timestamp > '2003-06-11 9:22 EDT'::timestamp
>
> > -> Index Scan using timestamp_idx on event (cost=0.00..557630.23 rows=237136 width=24) (actual time=0.22..16.58 rows=139 loops=1)
> > Index Cond: ("timestamp" > ('2003-06-11 09:22:00'::timestamp without time zone)::timestamp with time zone)
>
> It would probably help if you cast the constant to the same datatype
> as the column is (which is evidently timestamp with time zone).
> Coercions between timestamp and timestamptz are not considered
> constants, because they depend on SET TIMEZONE.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | btober | 2003-06-11 20:08:10 | Re: Pg_dumpall |
Previous Message | Dann Corbit | 2003-06-11 20:05:26 | Re: Postgres performance comments from a MySQL user |