-
Notifications
You must be signed in to change notification settings - Fork 86
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
Improve master_commit_red query performance #6174
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
workflow_job job FINAL | ||
JOIN workflow_run FINAL ON workflow_run.id = workflow_job.run_id | ||
JOIN push FINAL ON workflow_run.head_commit.'id' = push.head_commit.'id' | ||
default.workflow_job job final join all_runs workflow_run on workflow_run.id = workflow_job.run_id |
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.
This reads a bit confusing IMO. If I read it correctly, the all_runs
table has the alias as workflow_run
, which has the correct syntax. But I always think of workflow_run
as the workflow_run
table instead of having it as an alias. So, it feels easier just to call it all_runs
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.
We can only see the improvement on https://hud.pytorch.org/query_execution_metrics after this lands. I wonder if there is a way to get the information for the new query at PR time. Let's chat more on this when you're back
Pre filter the commits so we can filter the workflow job and workflow run tables on it later
This improves speed for all time ranges up to 1 year. I did not check beyond that
I believe the memory used is about the same, but it scans more rows for some reason
This is the query behind this chart
on the metrics page