Re: Use my (date) index, darn it!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: siracusa(at)mindspring(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Use my (date) index, darn it!
Date: 2004-01-05 06:55:43
Message-ID: 22764.1073285743@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

John Siracusa <siracusa(at)mindspring(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Teran 2004-01-05 11:28:32 optimizing Postgres queries
Previous Message John Siracusa 2004-01-04 23:36:16 Use my (date) index, darn it!