Re: Explicit timestamp conversion very slow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hamby, Mark CONTRACTOR HAMBYM" <MARK(dot)HAMBY(at)LEAVENWORTH(dot)ARMY(dot)MIL>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Explicit timestamp conversion very slow
Date: 2002-09-16 13:27:33
Message-ID: 26129.1032182853@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Hamby, Mark CONTRACTOR HAMBYM" <MARK(dot)HAMBY(at)LEAVENWORTH(dot)ARMY(dot)MIL> writes:
> /* QUERY WITH EXPLICIT TIMESTAMP CONVERSION */
> /* DOES NOT USE INDEX AND IS VERY SLOW. */
> /* DOES ANYONE CARE? */

Nope.

> explain analyze
> select count(*)
> from truth_units
> where time = timestamp '2002-08-15 10:00'
> ;

"timestamp" is "timestamp with time zone" in 7.2. So this is an
unindexable cross-datatype comparison.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-09-16 13:30:41 Re: Unable to convert date to tm
Previous Message Ron Johnson 2002-09-16 10:16:48 Re: [BUGS] Postgres storing time in strange manner