On 4/7/2025 10:30, Ilia Evdokimov wrote:
> On 01.05.2025 15:22, Ilia Evdokimov wrote:
>
>> I attached updated v9 patch with the suggested changes. The updated
>> line in the EXPLAIN looks like this:
>>
>> Text format:
>> Estimates: capacity=1 distinct keys=1 lookups=2 hit percent=50.00%
>>
>> Non-text format:
>> Estimated Capacity: 1
>> Estimated Distinct Lookup Keys: 1
>> Estimated Lookups: 2
>> Estimated Hit Percent: 50.00
>>
>> Any suggestions?
>
>
> I attached rebased v10 patch on 5a6c39b.
Exposing internal information about the estimation of the number of
groups in the Memoise node, shouldn't we do the same in even more vague
cases, such as IncrementalSort? For example, in [1] (see its
attachment), I observe that IncrementalSort is considerably better than
Sort, but has a larger cost. It would be helpful to understand if an
incorrect ngroups estimation causes this.
[1]
https://www.postgresql.org/message-id/a74d2648-c93e-4686-a8d4-2843515b8702@gmail.com
--
regards, Andrei Lepikhov