Re: Is unique index always used if query is on first constituent column ?

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

 



Bruno Wolff III <bruno@xxxxxxxx> writes:
>   Rajesh Kumar Mallah <mallah.rajesh@xxxxxxxxx> wrote:
>> create unique index ab on t(a,b);
>> create index b on t(b);

> If the b data is large you might get some performance increase from adding
> an index on just a. You will be trading off increased work when doing updates
> to handle the extra index versus faster searches in a more compact index.

This is covered in some detail in TFM:
http://www.postgresql.org/docs/8.2/static/indexes-multicolumn.html
http://www.postgresql.org/docs/8.2/static/indexes-bitmap-scans.html

			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