pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Gagnon <dgagnon@siunik.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Why the planner is not using the INDEX .
Date: Tue, 05 Jul 2005 12:09:56 -0400
Message-ID: <23492.1120579796@sss.pgh.pa.us> (raw)
In-Reply-To: <42C994BD.3000909@siunik.com>
References: <20050630222451.GA17628@calvin.surfutopia.net>
	<42C473BA.9090305@commandprompt.com>
	<20050630235821.GA2163@calvin.surfutopia.net>
	<42C994BD.3000909@siunik.com>

David Gagnon <dgagnon@siunik.com> writes:
>  explain analyse SELECT IRNUM FROM IR
>         INNER JOIN IT ON  IT.ITIRNUM = ANY ('{1000, 2000}') AND 
> IT.ITYPNUM = 'M' AND IR.IRYPNUM = IT.ITYPNUM AND IR.IRNUM = IT.ITIRNUM 
>         WHERE IRNUM = ANY ('{1000, 2000}') and IRYPNUM = 'M'

Those =ANY constructs are not currently optimizable at all.  You might
get better results with "IT.ITIRNUM IN (1000, 2000)" etc.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <23492.1120579796@sss.pgh.pa.us>
Permalink:  ../23492.1120579796@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23492.1120579796@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, dgagnon@siunik.com
  Subject: Re: Why the planner is not using the INDEX .
  In-Reply-To: <23492.1120579796@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