pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Artūras Lapinskas <arturaslape@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Index order ignored after `is null` in query
Date: Fri, 14 Nov 2014 20:12:32 -0600
Message-ID: <5466B690.5000705@BlueTreble.com> (raw)
In-Reply-To: <20141107111451.GA477@guest-docking-cx-1-0139.ethz.ch>
References: <20141105214243.GA546@public-docking-cx-1771.ethz.ch>
	<20141106170612.GA527@public-docking-cx-1226.ethz.ch>
	<10744.1415294592@sss.pgh.pa.us>
	<20141107111451.GA477@guest-docking-cx-1-0139.ethz.ch>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 11/7/14, 5:14 AM, Artūras Lapinskas wrote:
> thanks for your time and answer. Not treating IS NULL as equality operator definitely helps me to make more sense out of previous explains.

You can also try creating a partial index WHERE b IS NULL. WHERE b IS NOT NULL can also sometimes be useful, though for different reasons.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (6+ messages)

Message-ID: <5466B690.5000705@BlueTreble.com>
Permalink:  ../5466B690.5000705@BlueTreble.com/
Also on:    postgresql.org/message-id/5466B690.5000705@BlueTreble.com

 · 

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: Jim.Nasby@BlueTreble.com, arturaslape@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Index order ignored after `is null` in query
  In-Reply-To: <5466B690.5000705@BlueTreble.com>

* 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