Re: performance on selecting a row in large tables

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

 



"Rainer Spittel" <rainer.spittel@xxxxxxxxxxxxxxx> writes:
>   One of those slow queries are running on col02 which has a btree
> index. But I use the 'in' expression to get a set of matching rows:
>   select * from table where col02 in ('...',[...],'...') 
>   This query gets sometimes really slow, I guess it depends on the size
> of the set used by 'in'.

Don't guess.  Use EXPLAIN ANALYZE and find out what is happening.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[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