-
Notifications
You must be signed in to change notification settings - Fork 753
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
refactor: optimize query system.tables when query single table #16869
Conversation
58caec1
to
9e8ef8b
Compare
9e8ef8b
to
6aa63b9
Compare
Docker Image for PR
|
ClickBench Report |
6aa63b9
to
855a244
Compare
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.
LGTM
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.
Reviewed 22 of 22 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @b41sh)
Metadata query performance has regressed in some cases. Suggest reverting to resolve quickly and fix properly next week.
Metadata query performance has regressed in some cases. Suggest reverting to resolve quickly and fix properly next week.
…endlabs#16869) optimize: optimize query system.tables when query single table
…endlabs#16869) optimize: optimize query system.tables when query single table
…endlabs#16869) optimize: optimize query system.tables when query single table
…endlabs#16869) optimize: optimize query system.tables when query single table
… (#17021) optimize: optimize query system.tables when query single table
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
moved SYSTEM_TABLES_ALLOW_LIST to src/meta/app/src/principal/user_grant.rs. I also refactored the get_visibility_checker function and added a new parameter: ignore_ownership.
The purpose of this parameter is to optimize the performance of querying table information from system.tables. When this parameter is set, we can skip listing all ownerships and directly fetch a single ownership object, then perform only one get operation, thus reducing query time. In short, this change aims to improve the efficiency of querying table information from system.tables by avoiding unnecessary operations on the list of ownerships.
Tests
Type of change
This change is