Re: Major upgrade advice

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

 



Jan-Ivar Mellingen <jan-ivar.mellingen@xxxxxxxx> writes:
> I got curious and did a few tests on a 8.3.3 database on my laptop.
> The 3 different queries all worked, but one took twice as long.

> SELECT * FROM alarmlogg WHERE alarm_tid >= CAST('2007-05-20' as 
> timestamp) AND alarm_tid < CAST('2008-05-21' as timestamp);
> --> 301 seconds.

Unsurprising: a comparison between a timestamp with timezone and
one without involves a timezone conversion, so it's gonna be slow.

It's a bit annoying that the system doesn't have the intelligence
to convert the constants to timestamptz just once; but I think
doing that would require introducing an implicit cast from
timestamp to timestamptz, which might cause surprising behaviors
elsewhere.

			regards, tom lane


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux