Skip to content

support extended statistics for column groups #18330

Open

Description

@eurekaka

Development Task

To avoid independent assumptions of multiple columns in planner estimation, provide interfaces to collect extended statistics as required, e.g:

1) CREATE STATISTICS stats1 (cardinality) ON t(a,b);
2) CREATE STATISTICS stats2 (dependency) ON t(a,b);
3) CREATE STATISTICS stats3 (correlation) ON t(a,b);

1 helps for cases like select * from t group by a, b / select * from t join tt on t.a = tt.a and t.b = tt.b;
2 helps for cases like select * from t where a = 1 and b > 1;
3 helps for cases like select * from t where a > 1 order by b limit 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions