Re: performance on selecting a row in large tables - Mailing list pgsql-admin

From Tom Lane
Subject Re: performance on selecting a row in large tables
Date
Msg-id 8937.1202161400@sss.pgh.pa.us
Whole thread Raw
In response to Re: performance on selecting a row in large tables  ("Rainer Spittel" <rainer.spittel@terralink.co.nz>)
List pgsql-admin
"Rainer Spittel" <rainer.spittel@terralink.co.nz> 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

pgsql-admin by date:

Previous
From: "Rainer Spittel"
Date:
Subject: Re: performance on selecting a row in large tables
Next
From: Tino Schwarze
Date:
Subject: Re: performance on selecting a row in large tables