Re: One query run twice in parallel results in huge performance decrease - Mailing list pgsql-performance

From Tom Lane
Subject Re: One query run twice in parallel results in huge performance decrease
Date
Msg-id 21793.1385768887@sss.pgh.pa.us
Whole thread Raw
In response to Re: One query run twice in parallel results in huge performance decrease  (Jan Michel <Jan@mueschelsoft.de>)
Responses Re: One query run twice in parallel results in huge performance decrease  (Jan Michel <Jan@mueschelsoft.de>)
List 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 by date:

Previous
From: Jan Michel
Date:
Subject: Re: One query run twice in parallel results in huge performance decrease
Next
From: Jan Michel
Date:
Subject: Re: One query run twice in parallel results in huge performance decrease