Re: Use of multipart index with "IN"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rob Messer <rrmesser(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Use of multipart index with "IN"
Date: 2003-10-27 17:17:09
Message-ID: 400.1067275029@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Rob Messer <rrmesser(at)yahoo(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dror Matalon 2003-10-27 17:23:10 Re: Various performance questions
Previous Message Damien Dougan 2003-10-27 16:26:52 Very Poor Insert Performance