Search Postgresql Archives

Re: Why is the comparison between timestamp and date so much slower then between two dates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Kellerer <spam_eater@xxxxxxx> writes:
> So my question is: why is comparing a timestamp to a date so much slower?

The date has to be up-converted to a timestamptz (not timestamp).
I think the expensive part of that is determining what timezone
applies, in particular whether DST is active.  You could try it
with "localtimestamp" (no parens) instead of "now()" to see how
it performs with a non-tz timestamp.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux