On 9/2/20 9:12 PM, Tomas Vondra wrote:
> We could simply use the input "tuples" value here, and then divide the
> current and previous estimate to calculate the number of new groups.
Performing a review of this patch I made a number of changes (see
cleanup.txt). Maybe it will be useful.
As I see, the code, which implements the main idea, is quite stable.
Doubts localized in the cost estimation routine. Maybe try to finish
this work by implementing an conservative strategy to a cost estimation
of sorting?
--
regards,
Andrey Lepikhov
Postgres Professional