-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: fast path point select #6937
Changes from 1 commit
2198b32
e855838
699b34b
e5adb09
9c01155
4942f47
0971fff
171daed
a183771
55757cd
01be667
4bb52a0
b4843e9
5b4f1b3
fd96ed9
aaad31e
050235d
74fc80d
f0ff662
c8e64d5
b8598b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…nt-select Conflicts: plan/plan.go plan/stats.go
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ func (fp *PointSelectPlan) SetChildren(...PhysicalPlan) {} | |
func (fp *PointSelectPlan) ResolveIndices() {} | ||
|
||
func tryFastPlan(ctx sessionctx.Context, node ast.Node) Plan { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add more comment about this function. |
||
if PreparedPlanCacheEnabled || ctx.GetSessionVars().PlanCacheEnabled { | ||
if PreparedPlanCacheEnabled { | ||
// plan cache not supported yet. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any plan to support fast-path with plan cache? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the comment could be improved. |
||
return nil | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,10 @@ func (s *statsInfo) scaleByExpectCnt(expectCnt float64) *statsInfo { | |
return s | ||
} | ||
|
||
func newSimpleStats(rowCount float64) *statsInfo { | ||
return &statsInfo{count: rowCount} | ||
} | ||
|
||
func (p *basePhysicalPlan) statsInfo() *statsInfo { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it's unexported now, is this interface still needed? |
||
return p.stats | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this function can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called by
executor
package to determine if the query is expensive.