Re: Almost infinite query -> Different Query Plan when changing where clause value

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Almost infinite query -> Different Query Plan when changing where clause value
Дата
Msg-id 4B756CE5020000250002F27C@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Almost infinite query -> Different Query Plan when changing where clause value  (lionel duboeuf <lionel.duboeuf@boozter.com>)
Ответы Re: Almost infinite query -> Different Query Plan when changing where clause value  (lionel duboeuf <lionel.duboeuf@boozter.com>)
Список pgsql-performance
lionel duboeuf <lionel.duboeuf@boozter.com> wrote:
> Thanks kevin for your answer. Here is some additionnal
> informations attached as files.

Could you supply an EXPLAIN ANALYZE of the fast plan as an
attachment, for comparison?

Anyway, it looks like at least one big problem is the bad estimate
on how many rows will be generated by joining to the users5_ table:

> (cost=13.20..1427.83 rows=1 width=24)
> (actual time=1.374..517.662 rows=122850 loops=1)

If it had expected 122850 rows to qualify for that join, it probably
would have picked a different plan.

I just reread your original email, and I'm not sure I understand
what you meant regarding VACUUM ANALYZE.  If you run that right
beforehand, do you still get the slow plan for user 10?

-Kevin

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

Предыдущее
От: lionel duboeuf
Дата:
Сообщение: Re: Almost infinite query -> Different Query Plan when changing where clause value
Следующее
От: Greg Smith
Дата:
Сообщение: Re: moving pg_xlog -- yeah, it's worth it!