Skip to content
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

Optimize load data assignment expressions #46081

Closed
gengliqi opened this issue Aug 14, 2023 · 0 comments
Closed

Optimize load data assignment expressions #46081

gengliqi opened this issue Aug 14, 2023 · 0 comments
Labels
affects-6.5 affects-7.1 sig/execution SIG execution type/enhancement The issue or PR belongs to an enhancement.

Comments

@gengliqi
Copy link
Contributor

gengliqi commented Aug 14, 2023

Enhancement

image

According to the above CPU flame graph, most of the time spends on rewriteAstExpr.
The root cause is that the ASTs of assignment expressions in load data are rewritten for each row, which may make the load data super slow.

#43492 has already fixed this issue, but only the TiDB clusters whose versions are greater than or equal to v7.2 contain this pr. In addition, there are some PR for load data code refactoring in v7.1.

So a tiny fix for this issue is needed for the previous TiDB version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 sig/execution SIG execution type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants