[feat](stats) Support preheating for stats#18460
Closed
Kikyou1997 wants to merge 2 commits intoapache:masterfrom
Closed
[feat](stats) Support preheating for stats#18460Kikyou1997 wants to merge 2 commits intoapache:masterfrom
Kikyou1997 wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
Author
|
run buildall |
41b233a to
26669ee
Compare
Contributor
|
if there is no history information, can we load some stats on FE startup? |
Contributor
Author
No |
Contributor
|
i think just load top k newest column statistics is good enough, log the cache status is not necessary |
Contributor
|
and we should load the statistics info after analyze job success immediately |
Contributor
Author
This logic already exists currently. |
Contributor
|
if there is no history information, could you just load |
5 tasks
morrySnow
pushed a commit
that referenced
this pull request
Apr 11, 2023
1. Support prefetch some column stats when FE booted, it would load column stats that was got updated recently according to the comment of PR #18460 from @morrySnow 2. Refactor stats cache, split histogram cache from column stats, so that we could avoid some redundant query for column statistics table,for example, update the histogram or column stats only, in the previous implementation a united cache loader would send query request to both column stats table and histogram table, 3. Extract some common logic to StatsUtil 4. Remove some useless codes in unit tests, those codes is hard to maintaince and it's not a good idea for testing the accurracy of stats estimation according to the advise from @englefly 5. Add field type restriction when create analysis tasks to avoid unnecessary failure
gnehil
pushed a commit
to gnehil/doris
that referenced
this pull request
Apr 21, 2023
1. Support prefetch some column stats when FE booted, it would load column stats that was got updated recently according to the comment of PR apache#18460 from @morrySnow 2. Refactor stats cache, split histogram cache from column stats, so that we could avoid some redundant query for column statistics table,for example, update the histogram or column stats only, in the previous implementation a united cache loader would send query request to both column stats table and histogram table, 3. Extract some common logic to StatsUtil 4. Remove some useless codes in unit tests, those codes is hard to maintaince and it's not a good idea for testing the accurracy of stats estimation according to the advise from @englefly 5. Add field type restriction when create analysis tasks to avoid unnecessary failure
Reminiscent
pushed a commit
to Reminiscent/doris
that referenced
this pull request
May 15, 2023
1. Support prefetch some column stats when FE booted, it would load column stats that was got updated recently according to the comment of PR apache#18460 from @morrySnow 2. Refactor stats cache, split histogram cache from column stats, so that we could avoid some redundant query for column statistics table,for example, update the histogram or column stats only, in the previous implementation a united cache loader would send query request to both column stats table and histogram table, 3. Extract some common logic to StatsUtil 4. Remove some useless codes in unit tests, those codes is hard to maintaince and it's not a good idea for testing the accurracy of stats estimation according to the advise from @englefly 5. Add field type restriction when create analysis tasks to avoid unnecessary failure
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Load the most recently used stats as FE booted.
StatsCacheLoader will record the column(tblid-idxid-colname) it loaded to a map. This PR add a shutdown hook to FE so that we could write the records in map to the metadata.
When booting, Stats of columns that recorded previously would be loaded by a single thread.
NOTE
This PR add new operation type of log, so the metadata is not backforward compatitable, once user or dev run their FE on the code of this version they cannot rollback to previous FE version.
Problem summary
Describe your changes.
Checklist(Required)
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...