Hi,
On 2022-02-10 17:13:52 +0900, Amit Langote wrote:
> The attached patch implements this idea. Sorry for the delay in
> getting this out and thanks to Robert for the off-list discussions on
> this.
I did not follow this thread at all. And I only skimmed the patch. So I'm
probably wrong.
I'm a wary of this increasing executor overhead even in cases it won't
help. Without this patch, for simple queries, I see small allocations
noticeably in profiles. This adds a bunch more, even if
!context->stmt->usesPreExecPruning:
- makeNode(ExecPrepContext)
- makeNode(ExecPrepOutput)
- palloc0(sizeof(PlanPrepOutput *) * result->numPlanNodes)
- stmt_execprep_list = lappend(stmt_execprep_list, execprep);
- AllocSetContextCreate(CurrentMemoryContext,
"CachedPlan execprep list", ...
- ...
That's a lot of extra for something that's already a bottleneck.
Greetings,
Andres Freund