Re: Query Plan - Index Scan & Seq Scan

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

 



Prasanth <dbadmin@xxxxxxxxxxx> writes:
> Seems like having int2 after code is doing the trick.
> Can you please explain the reasons behind this.

When you write "int2col > 2", the operator that is selected is int2-gt-int4.
However the index on an int2 column can only deal with int2-gt-int2.

8.0 generalized the index mechanism enough to allow int2 indexes to deal
with int2-gt-int4, but in earlier releases you have to take care to make
the constant an int2.

int8 columns have the same issue from the other direction ...

			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