Re: Planner not using UNIQUEness of index properly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Burger <john(at)mitre(dot)org>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Planner not using UNIQUEness of index properly
Date: 2007-12-10 16:11:37
Message-ID: 14571.1197303097@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Burger <john(at)mitre(dot)org> writes:
> create unique index ix_allWords_lower on allWords (lower(word));

> To my surprise, the planner does not seem to realize that only one
> row can result from using this index:

> I would think UNIQUE => one row is pretty obvious - what am I
> missing? (Unless it's that I'm still stuck in 7.4.)

That would be the problem :-( ... a look at the code suggests that the
ability to do anything intelligent with expression indexes was added
in 8.0.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-12-10 16:13:37 Re: Planner not using UNIQUEness of index properly
Previous Message Ted Byers 2007-12-10 16:09:02 Re: Simpler dump?