Re: Incorrect estimates on correlated filters

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Incorrect estimates on correlated filters
Дата
Msg-id 20080813205830.GC4672@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Incorrect estimates on correlated filters  ("Chris Kratz" <chris.kratz@vistashare.com>)
Список pgsql-performance
Chris Kratz wrote:

> Unfortunately, if I don't think the sorting idea would help in the one case
> I'm looking at which involves filters on two tables that are joined
> together.  The filters happen to be correlated such that about 95% of the
> rows from each filtered table are actually returned after the join.
> Unfortunately, the planner thinks we will get 1 row back.

Maybe you can wrap that part of the query in a SQL function and set its
estimated cost to the real values with ALTER FUNCTION ... ROWS.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-performance по дате отправления:

Предыдущее
От: Henrik
Дата:
Сообщение: Re: Filesystem benchmarking for pg 8.3.3 server
Следующее
От: Alvaro Herrera
Дата:
Сообщение: autovacuum: use case for indenpedent TOAST table autovac settings