Re: Planner Row Estimate with Function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fork <mfork00(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Planner Row Estimate with Function
Date: 2009-12-29 20:43:06
Message-ID: 12115.1262119386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Fork <mfork00(at)yahoo(dot)com> writes:
> I have an index scan on a custom function that is returning a wildly incorrect row estimate that is throwing off the rest of the query planning. The result of the function is roughly unique - there are a handful with multiple entries - but the planner is estimating 227,745 rows. I re-ran ANALYZE on the table and the results did not change. Any suggestions on how to get more accurate planner result?

What PG version is this exactly?

Also, what happened to the type='CREDIT' condition in your query? Is
that a partial index?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anthony 2009-12-29 20:43:12 Re: memory usage of group by select
Previous Message Anthony 2009-12-29 20:41:21 memory usage of group by select