Skip site navigation (1) Skip section navigation (2)

Re: Null values in indexes

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Dann Corbit <DCorbit(at)connx(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Null values in indexes
Date: 2002-05-29 14:38:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> Hannu Krosing <hannu(at)tm(dot)ee> writes:
> > How hard would it be to _not_ include nulls in indexes
> > as they are not used anyway.
> Seems to me that would be a step backwards.

    It  would cause multi-key indexes beeing unusable for partial
    key lookup. Imagine you have a key over (a, b, c)  and  query
    with  WHERE  a = 1 AND b = 2. This query cannot use the index
    if a NULL value in c  would  cause  the  index  entry  to  be



# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to


pgsql-hackers by date

Next:From: Kenneth ChanDate: 2002-05-29 14:44:53
Subject: Re: Polygons passed to poly_overlap have 0 pts when
Previous:From: Tom LaneDate: 2002-05-29 12:47:23
Subject: Re: Backend died abnormally

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group