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

[improvement](serde) Optimizing the performance of mysql result writer #20928

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Jun 16, 2023

Proposed changes

When converting query results into MySQL format, it involves transforming columnar data storage into row-based storage. This process raises the question of choosing between sequential reading and sequential writing. In reality, sequential writing is the better choice for performance optimization.

Test with 9M rows contains more than 20 columns, this patch can reduce the conversion time from 20s to 11s.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 16, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mrhhsg mrhhsg force-pushed the opt_mysql_writer branch from 6b2bc6a to 6fc3f31 Compare June 16, 2023 16:17
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 16, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mrhhsg mrhhsg force-pushed the opt_mysql_writer branch from 6fc3f31 to 56b501c Compare June 17, 2023 03:00
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 17, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mrhhsg mrhhsg force-pushed the opt_mysql_writer branch from 56b501c to cce928c Compare June 17, 2023 06:55
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 17, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

int buf_ret = 0;
for (ssize_t i = start; i < end; ++i) {
if (0 != buf_ret) {
if constexpr (is_binary_format) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_binary_format can not present return_object_data_as_binary , just because we have a switch return_object_data_as_binary, so there is a situation with return_object_data_as_binary=true , but is_binary_format is false.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks for your comment.

@mrhhsg mrhhsg force-pushed the opt_mysql_writer branch from cce928c to 22cd769 Compare June 17, 2023 16:04
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 17, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mrhhsg mrhhsg force-pushed the opt_mysql_writer branch from 22cd769 to 863cb4e Compare June 18, 2023 03:16
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 18, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mrhhsg mrhhsg force-pushed the opt_mysql_writer branch from 863cb4e to 2c88bdf Compare June 18, 2023 13:24
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 18, 2023

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 19, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@amorynan
Copy link
Contributor

LGTM

Copy link
Contributor

@amorynan amorynan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei yiguolei merged commit 08fff89 into apache:master Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0-beta-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants