Re: Postgres optimizer choosing wrong index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jack Orenstein <jack(dot)orenstein(at)hds(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres optimizer choosing wrong index
Date: 2008-10-23 17:15:51
Message-ID: 10970.1224782151@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jack Orenstein <jack(dot)orenstein(at)hds(dot)com> writes:
> Tom Lane wrote:
>> If you plug in a value that *does* occur in the table it should probably
>> choose the more-relevant index consistently.

> Unfortunately, it matters a lot at runtime. The dh value is not very selective,
> as shown by the statistics above.

A dh value that does not occur in the index is *perfectly* selective.
I'm not sure what your problem is but this example isn't illustrating
anything wrong that I can see.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jack Orenstein 2008-10-23 17:15:57 Re: Postgres optimizer choosing wrong index
Previous Message Alvaro Herrera 2008-10-23 17:15:37 Re: Annoying Reply-To