Re: Parallel execution and prepared statements - Mailing list pgsql-hackers

From Tobias Bussmann
Subject Re: Parallel execution and prepared statements
Date
Msg-id 163C934C-6492-4823-82DB-1EBFB7E3E610@gmx.net
Whole thread Raw
In response to Re: Parallel execution and prepared statements  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> True, but we also try to avoid it whenever possible, because it's
> likely to lead to poor performance.

This non-readonly case should be way less often hit compared to other uses of prepared statements. But sure, it depends
onthe individual use case and a likely performance regession in these edge cases is nothing to decide for easily. 


> I think it would be a good idea to come up with a way for a query to
> produce both a parallel and a non-parallel plan and pick between them
> at execution time.  However, that's more work than I've been willing
> to undertake.

Wouldn't the precautionary generation of two plans always increase the planning overhead, which precisely is what one
wantto reduce by using prepared statements?  

Best regards
Tobias


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Improvements in psql hooks for variables
Next
From: Robert Haas
Date:
Subject: Re: condition variables