Re: Use of multipart index with "IN" - Mailing list pgsql-performance

From Tom Lane
Subject Re: Use of multipart index with "IN"
Date
Msg-id 400.1067275029@sss.pgh.pa.us
Whole thread Raw
In response to Use of multipart index with "IN"  (Rob Messer <rrmesser@yahoo.com>)
List pgsql-performance
Rob Messer <rrmesser@yahoo.com> writes:
> The problem comes in when we are selecting multiple field_name values
> in one query.  The normal SQL syntax we have been using is like this:

> select field_name, option_tag from ds_rec_fld where recid = 3001 and
> field_name in ('Q3A1', 'Q3A9');

You'd have better luck if field_name were the first column of the
two-column index.  See the archives.

Improving this situation is on the to-do list but it seems not trivial
to fix.

            regards, tom lane

pgsql-performance by date:

Previous
From: Rob Nagler
Date:
Subject: Re: vacuum locking
Next
From: Dror Matalon
Date:
Subject: Re: Various performance questions