Re: Use my (date) index, darn it! - Mailing list pgsql-performance

From Tom Lane
Subject Re: Use my (date) index, darn it!
Date
Msg-id 22764.1073285743@sss.pgh.pa.us
Whole thread Raw
In response to Use my (date) index, darn it!  (John Siracusa <siracusa@mindspring.com>)
Responses Re: Use my (date) index, darn it!
List pgsql-performance
John Siracusa <siracusa@mindspring.com> writes:
> Obviously the planner is making some bad choices here.

A fair conclusion ...

> I know that it is trying to avoid random seeks or other scary things
> implied by a "correlation" statistic that is not close to 1 or -1, but
> it is massively overestimating the hit caused by those seeks and
> seemingly not taking into account the size of the table!

You haven't given any evidence to support these conclusions, though.
Could we see some table schemas, EXPLAIN ANALYZE output, and relevant
pg_stats entries for the various cases?

            regards, tom lane

pgsql-performance by date:

Previous
From: John Siracusa
Date:
Subject: Use my (date) index, darn it!
Next
From: David Teran
Date:
Subject: optimizing Postgres queries