Skip to content
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

Backfill distribution table #60

Merged
merged 2 commits into from
May 14, 2021
Merged

Backfill distribution table #60

merged 2 commits into from
May 14, 2021

Conversation

dianaclarke
Copy link
Member

No description provided.

for d in distributions
}

summaries = connection.execute(summary_table.select())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dianaclarke If we only select summary rows with run_ids for runs with name like commit: %, we can cut down loop iterations (for summary in summaries) by more than 50%:

select count(1) 
from summary

2288167

select count(1) 
from summary, machine
where summary.machine_id = machine.id and
machine.name in ('ursa-i9-9960x', 'ec2-t3-large-us-east-2', 'ec2-t3-xlarge-us-east-2', 'ursa-thinkcentre-m75q') 

1525400


select count(1) 
from summary, machine, run
where summary.machine_id = machine.id and
machine.name in ('ursa-i9-9960x', 'ec2-t3-large-us-east-2', 'ec2-t3-xlarge-us-east-2', 'ursa-thinkcentre-m75q') and
summary.run_id = run.id and
run.name like 'commit: %'

993577


select count(1) 
from summary, run
where summary.run_id = run.id and
run.name like 'commit: %'

1036257

@dianaclarke dianaclarke merged commit 9e33f49 into main May 14, 2021
@dianaclarke dianaclarke deleted the backfill-dist-2 branch May 14, 2021 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants