I don't know. How about if a RelNode's cost means the cost of each
execution (yeah, I know, we're ignoring the fact that the 1st is
always slower than the rest) and Correlate multiplies the cost of the
RHS by the estimated number of restarts?

On Tue, Nov 25, 2014 at 12:58 AM, Vladimir Sitnikov
<[email protected]> wrote:
> Hi,
>
> While working on LogicalCorrelate, I identified that Calcite's cost
> model does not have room for rescans.
> In other words, the cost of the plan Correlate(ScanA, ScanB) is just
> selfCost(ScanA)+selfCost(ScanB)+selfCost(Correlate).
>
> What is the intended way to report rescan cost?
> Should selfCost(Correlate) include numRows(A)*fullCost(ScanB) -
> fullCost(ScanB) ? /* Calcite will add fullCost(ScanB), so this -1 is a
> compensation */
>
> --
> Vladimir Sitnikov

Reply via email to