Hi,
Andy, thank you, I've checked this thread out along with run-time partition pruning.
I've spend some time hovering on the tuple_fraction field usage and would disagree
with you on this topic - it is already used on the RelOptInfo level later on, in
generate_orderedappend_paths()
I mean the following piece:
if (root->tuple_fraction > 0)
{
double path_fraction = (1.0 / root->tuple_fraction);
Path cheapest_consider_fraction;
cheapest_fractional = get_cheapest_fractional_path_for_pathkeys(childrel->pathlist, pathkeys, NULL, path_fraction);
...
function, so it does not seem incorrect to use its value for a single relation in subquery -
I agree that we do not have accurate estimation at this level, but we could use the one
we already have.
I've also tried hard to find an example where this patch could break something,
but without success.
--
Nikita Malakhov
Postgres Professional
The Russian Postgres Company