Re: Index order ignored after `is null` in query

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Artūras Lapinskas <arturaslape(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Index order ignored after `is null` in query
Date: 2014-11-15 02:12:32
Message-ID: 5466B690.5000705@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2014-11-15 03:29:26 Re: pgtune + configurations with 9.3
Previous Message Jim Nasby 2014-11-15 02:08:59 Re: pgtune + configurations with 9.3