Re: Index not used with IS NULL - Mailing list pgsql-general

From Dima Tkach
Subject Re: Index not used with IS NULL
Date
Msg-id 3E50F4F6.5000704@openratings.com
Whole thread Raw
In response to Re: Index not used with IS NULL  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
>
>
>Yes, this solution does double index the NULLs, but if you have alot of
>NULLs you probably should be doing a seqscan to find them anyway and don't
>need the index.  High update frequency costs you the NULL check, which is
>a little annoying, and if you've got a small number of NULL rows or the
>data is clustered in some fashion (so that the index is a win) that have
>lots of updates this may become significant.
>
>
Yeah... But imagine the real-life condition, when I have a *moderate*
number of nulls (not enough to justify a seq.scan, but still a lot) in
*several* different columns - so that, instead of creating a single
multi-column index, I would have to create a whole bunch of them with
different predcates - where this is null and that is not null, where
this is null and tha is null etc, etc...

That's what annoys me a lot here :-(


pgsql-general by date:

Previous
From: Dima Tkach
Date:
Subject: Re: Index not used with IS NULL
Next
From: Tom Lane
Date:
Subject: Re: Index not used with IS NULL