On 11/1/24 12:22, Tatsuro Yamada wrote:
Hi All,

I apologize for not being able to continue development due to various circumstances.
The attached file is the rebased patch.
I will now catch up on the discussion and try to revise the patch.
I wonder why it’s so important to know exactly where and who has used extended statistics.

I often use SQL Server to compare execution plans generated by PostgreSQL, and I appreciate how they display the usage of extended statistics. They clearly identify which statistics were utilized during query planning and include them in the summary section of query plan.

I find this method much easier to implement, as it allows us to see any usage points - remember that `estimate_num_groups` may be applied in multiple places and may not always correspond to a node clause.

It’s worth noting that some clauses may be transformed during the planning process, and the scan filter may not align with the estimated clause. It’s possible that certain clauses might not appear in the final estimated plan based on the extended statistics.

If necessary, we could add an `extstat_ID` to the summary to reference it in the plan nodes.

--
regards, Andrei Lepikhov


Reply via email to