Re: One query run twice in parallel results in huge performance decrease

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: One query run twice in parallel results in huge performance decrease
Дата
Msg-id 21793.1385768887@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: One query run twice in parallel results in huge performance decrease  (Jan Michel <Jan@mueschelsoft.de>)
Ответы Re: One query run twice in parallel results in huge performance decrease  (Jan Michel <Jan@mueschelsoft.de>)
Список pgsql-performance
Jan Michel <Jan@mueschelsoft.de> writes:
> All tables are generated freshly from scratch by the same script only
> minutes before this query is run. I tested them all individually and
> never saw any problem, all use the same plan. As soon as I run two in
> parallel it happens. I also did a test by feeding two tables with
> identical data - again the same problem.

Hm.  Are you explicitly ANALYZE'ing the newly-built tables in your script,
or are you just trusting auto-analyze to get the job done?  It seems
possible that auto-analyze manages to finish before you start your big
query if there's just one set of tables to analyze, but not if there's two
sets.  That would explain bad choices of plans ...

            regards, tom lane


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

Предыдущее
От: Jan Michel
Дата:
Сообщение: Re: One query run twice in parallel results in huge performance decrease
Следующее
От: Jan Michel
Дата:
Сообщение: Re: One query run twice in parallel results in huge performance decrease