pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rob Messer <rrmesser@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Use of multipart index with "IN"
Date: Mon, 27 Oct 2003 12:17:09 -0500
Message-ID: <400.1067275029@sss.pgh.pa.us> (raw)
In-Reply-To: <20031023181831.40095.qmail@web41215.mail.yahoo.com>
References: <20031023181831.40095.qmail@web41215.mail.yahoo.com>

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



view thread (2+ messages)

Message-ID: <400.1067275029@sss.pgh.pa.us>
Permalink:  ../400.1067275029@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/400.1067275029@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rrmesser@yahoo.com
  Subject: Re: Use of multipart index with "IN"
  In-Reply-To: <400.1067275029@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox