Re: Weird indices

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Weird indices
Date: 2001-02-20 02:34:34
Message-ID: 10763.982636474@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> This raises some other questions. Why can't postgres get the count(*)
> from the index? Why doesn't it predict the correct number of rows in
> the planner? (25 estimated vs 16 actual).

The name of the game here is to make a plan *without* actually going
out and expending large amounts of time to find out the true state of
affairs; by the time you know for sure, you've already done the query.
We have to do a certain amount of guessing, otherwise the planner will
be a net drag on performance. Accordingly, the estimates will never be
perfectly accurate.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Larry Rosenman 2001-02-20 02:34:47 Re: Re: Postgres slowdown on large table joins
Previous Message adb 2001-02-20 02:32:20 index used when casting to different type?