"Mad Hatter" <mad_hatter_(at)hotmail(dot)com> writes:
> When I run the following query:
> SELECT attrib1 FROM table1 WHERE attrib2 IN ( '1', '3', '5', '7' );
Could we see the EXPLAIN ANALYZE output for that, as well as one of
these?
> SELECT attrib1 FROM table1 WHERE attrib2 = '1'
ISTM you should be getting roughly equivalent plans, that is an
indexscan for each of the constants.
(The nearby comments about IN being slow apply to "foo IN (SELECT ...)"
which this is not.)
regards, tom lane