You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When projection push down system variable is set on, all logical projections that contain push-downable expressions will generate potential tikv side physical projections. Currently optimizer evaluates the cost of root-side projection and tikv-side projection cost here:
Although it does consider network cost, calculation concurrency, expressions calculation overhead and other factors that may affect performance, in real situation it still have chances to chooses to push down some projections while performance degrades.
I can't give a decrete example here, but I believe we can't be too careful of such plan change logic. So we can consider adding some strict rules that only projections that satisfy these rules, can be pushed down to tikv side. Currently, I can think out two rules:
Projections that only prune columns can be pushed down
yibin87
changed the title
Limit projection pushed down scope to avoid performance degression
Limit projection pushed down scope to avoid potential performance degression
May 28, 2024
Enhancement
When projection push down system variable is set on, all logical projections that contain push-downable expressions will generate potential tikv side physical projections. Currently optimizer evaluates the cost of root-side projection and tikv-side projection cost here:
tidb/pkg/planner/core/plan_cost_ver2.go
Line 102 in 57d0b40
Although it does consider network cost, calculation concurrency, expressions calculation overhead and other factors that may affect performance, in real situation it still have chances to chooses to push down some projections while performance degrades.
I can't give a decrete example here, but I believe we can't be too careful of such plan change logic. So we can consider adding some strict rules that only projections that satisfy these rules, can be pushed down to tikv side. Currently, I can think out two rules:
The text was updated successfully, but these errors were encountered: