Re: Postgres optimizer choosing wrong index - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgres optimizer choosing wrong index
Date
Msg-id 10970.1224782151@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres optimizer choosing wrong index  (Jack Orenstein <jack.orenstein@hds.com>)
Responses Re: Postgres optimizer choosing wrong index  (Jack Orenstein <jack.orenstein@hds.com>)
List pgsql-general
Jack Orenstein <jack.orenstein@hds.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

pgsql-general by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Hot Standby utility and administrator functions
Next
From: Jack Orenstein
Date:
Subject: Re: Postgres optimizer choosing wrong index