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

plan: build prepared statement plan in Optimize phase. #4914

Merged
merged 3 commits into from Oct 28, 2017

Conversation

Projects
None yet
4 participants
@coocood
Member

coocood commented Oct 26, 2017

When we build the Execute plan, the underlying plan is not built, so we don't know what the plan is before we execute it.
This PR move the plan building for prepared statement to optimizer, so we know what plan we are going to execute before we execute it.

plan: build prepared statement plan in Optimize phase.
When we build the `Execute` plan, the underlying plan is not built, so we don't know what the plan is before we execute it.
This PR move the plan building for prepared statement to optimizer, so we know what plan we are going to execute before we execute it.
@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood
Member

coocood commented Oct 26, 2017

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Oct 26, 2017

Member

Will this PR improve performance?

Member

shenli commented Oct 26, 2017

Will this PR improve performance?

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Oct 26, 2017

Member

No, but future optimization will depend on it.

Member

coocood commented Oct 26, 2017

No, but future optimization will depend on it.

@zz-jason zz-jason added this to the 1.1 milestone Oct 27, 2017

SchemaVersion int64
UseCache bool
}
// Execute represents prepare plan.
type Execute struct {
basePlan
Name string
UsingVars []expression.Expression

This comment has been minimized.

@hanfei1991

hanfei1991 Oct 28, 2017

Member

Why the using vars is expression but datum ?

@hanfei1991

hanfei1991 Oct 28, 2017

Member

Why the using vars is expression but datum ?

This comment has been minimized.

@coocood

coocood Oct 28, 2017

Member

It may be user variable, need to be evaluated first.

@coocood

coocood Oct 28, 2017

Member

It may be user variable, need to be evaluated first.

This comment has been minimized.

@hanfei1991
@hanfei1991
@hanfei1991

LGTM

@hanfei1991 hanfei1991 merged commit e6f86e3 into pingcap:master Oct 28, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 72.297%
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@coocood coocood deleted the coocood:optimize-prepare branch Oct 29, 2017

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