-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] improve performance of show materialized views statement #54374
base: main
Are you sure you want to change the base?
[Enhancement] improve performance of show materialized views statement #54374
Conversation
fe/fe-core/src/main/java/com/starrocks/scheduler/history/TaskRunHistory.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/scheduler/history/TaskRunHistoryTable.java
Show resolved
Hide resolved
Signed-off-by: Murphy <[email protected]>
ff484b6
to
b309d0c
Compare
" JOIN MaxStartRunID msr" + | ||
" ON t.task_name = msr.task_name" + | ||
" AND cast(t.history_content_json->'startTaskRunId' as string) = msr.start_run_id" + | ||
" ORDER BY t.create_time DESC"; |
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.
after this, the max size that history table will output will be task's number, am I right?
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.
seems reseaonable.
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.
yes
" JOIN MaxStartRunID msr" + | ||
" ON t.task_name = msr.task_name" + | ||
" AND cast(t.history_content_json->'startTaskRunId' as string) = msr.start_run_id" + | ||
" ORDER BY t.create_time DESC"; |
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.
seems reseaonable.
fe7cd4e
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]❌ fail : 8 / 26 (30.77%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Why I'm doing:
What I'm doing:
When executing
SHOW MATERIALIZED VIEWS
, it is necessary to check the status of the last job.Currently, we retrieve all historical records for a materialized view (MV), which can be slow when there are many entries. To improve performance, we now only query the records for the most recent job.
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: