Re: Planner question - wrong row count estimation

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Planner question - wrong row count estimation
Дата
Msg-id 4AB7EE21.5060108@agliodbs.com
обсуждение исходный текст
Ответ на Planner question - wrong row count estimation  (Michael Korbakov <m.korbakov@postindustria.com>)
Список pgsql-performance
On 9/19/09 5:08 PM, Michael Korbakov wrote:
>                          ->  Hash Join  (cost=8.50..25.11 rows=1
> width=28) (actual time=0.092..1.864 rows=560 loops=1)
>                                Hash Cond:
> (((partners_shares.year)::double precision = (shares.year)::double
> precision) AND ((partners_shares.month)::double precision =
> (shares.month)::double precision))

This appears to be where the estimates go wrong; Postgres may be
assuming random correlation which isn't correct.

My suggestion would be to try and create matching indexes on
date_trunc(daily_domain_reports.date) and month & year of
monthly_shares_with_parents_materialized.

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: statement stats extra load?
Следующее
От: Alan McKay
Дата:
Сообщение: Re: statement stats extra load?