Re: add_path() for Path without InitPlan: cost comparison vs. Paths that require one - Mailing list pgsql-hackers

From Tom Lane
Subject Re: add_path() for Path without InitPlan: cost comparison vs. Paths that require one
Date
Msg-id 9080.1564061116@sss.pgh.pa.us
Whole thread Raw
In response to add_path() for Path without InitPlan: cost comparison vs. Paths that require one  (Dent John <denty@qqdd.eu>)
Responses Re: add_path() for Path without InitPlan: cost comparison vs. Paths that require one  (Dent John <denty@qqdd.eu>)
List pgsql-hackers
Dent John <denty@qqdd.eu> writes:
> However, if I factor back in the cost of the InitPlan, things net out much more in favour of a scan against the MV.
Ofcourse, the add_path() comparison logic doesn’t include the InitPlan cost, so the point is moot.  

Please explain yourself.  InitPlans will, as a rule, get stuck into the
same place in the plan tree regardless of which paths are chosen; that's
why we need not consider them in path cost comparisons.  Moreover, once
the initplan's own subplan is determined, it's going to be the same
regardless of the shape of the outer query --- so if we did factor it
in, it'd contribute the same cost to every outer path, and thus it
still wouldn't change any decisions.  So I don't follow what you're
on about here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: pantilimonov michael
Date:
Subject: Re: [GSoC] artbufmgr
Next
From: Rafia Sabih
Date:
Subject: Re: Initdb failure