-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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](statistic) fetch statistic data with catalog and database id #33928
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 38289 ms
|
TPC-DS: Total hot run time: 185237 ms
|
ClickBench: Total hot run time: 30.29 s
|
run buildall |
TPC-H: Total hot run time: 38528 ms
|
TPC-DS: Total hot run time: 184470 ms
|
ClickBench: Total hot run time: 30.25 s
|
run buildall |
TPC-H: Total hot run time: 38388 ms
|
TPC-DS: Total hot run time: 185762 ms
|
ClickBench: Total hot run time: 30.18 s
|
run buildall |
TPC-H: Total hot run time: 38520 ms
|
run buildall |
TPC-H: Total hot run time: 38267 ms
|
TPC-DS: Total hot run time: 185273 ms
|
ClickBench: Total hot run time: 30.44 s
|
Jibing-Li
approved these changes
Apr 22, 2024
PR approved by at least one committer and no changes requested. |
github-actions
bot
added
approved
Indicates a PR has been approved by one committer.
reviewed
labels
Apr 22, 2024
PR approved by anyone and no changes requested. |
wuwenchi
approved these changes
Apr 22, 2024
morningman
added a commit
to morningman/doris
that referenced
this pull request
Apr 27, 2024
…id (apache#33928) In previously, all statistic tables have a column named `id`. This column is combined with `tableId` and `indexId`. Because table's id is unique globally, so we can query statistic table by only `id` to fetch the table's statistic data. By for external table, the table's id may not be unique globally. For example, the table id may only be unique within a database. So we need more predicates to fetch the right statistic data. In this PR, I changed all query statements of statistic table, by adding `catalog_id` and `database_id` conditions. For example: ``` SELECT * FROM column_statistics WHERE `id` = '${id}' AND `catalog_id` = '${catalogId}' AND `db_id` = '${dbId}' ``` The content of `id` column in statistic tables remain unchanged, so that after user upgrade Doris, the existing statistic data can still be used.
morningman
added a commit
that referenced
this pull request
Apr 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
In previously, all statistic tables have a column named
id
.This column is combined with
tableId
andindexId
.Because table's id is unique globally, so we can query statistic table by only
id
to fetch the table's statistic data.
By for external table, the table's id may not be unique globally. For example, the table id
may only be unique within a database. So we need more predicates to fetch the right statistic data.
In this PR, I changed all query statements of statistic table, by adding
catalog_id
anddatabase_id
conditions.For example:
The content of
id
column in statistic tables remain unchanged, so that after user upgrade Doris,the existing statistic data can still be used.
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...