pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Willy-Bas Loos <willybas@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: not using partial index
Date: Wed, 20 Apr 2011 09:25:57 -0400
Message-ID: <25018.1303305957@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikUt403PkMGb4bFMHMBZsJZRPV5Bw@mail.gmail.com>
References: <BANLkTikUt403PkMGb4bFMHMBZsJZRPV5Bw@mail.gmail.com>

Willy-Bas Loos <willybas@gmail.com> writes:
> [ NOT field1 ISNULL is not seen as equivalent to field1 IS NOT NULL ]

> Any ideas why this might be?

The planner does not spend an infinite number of cycles on trying to
make different expressions look alike.

As it happens, 9.1 does know this equivalence, as a byproduct of
http://git.postgresql.org/gitweb?p=postgresql.git&a=commitdiff&h=220e45bf325b061b8dbd7451f87...
But I don't consider it a bug that older versions don't do it.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <25018.1303305957@sss.pgh.pa.us>
Permalink:  ../25018.1303305957@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25018.1303305957@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, willybas@gmail.com
  Subject: Re: not using partial index
  In-Reply-To: <25018.1303305957@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