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

Optimize large table runtime with incremental models #524

Closed
pnadolny13 opened this issue Jan 18, 2023 · 2 comments · Fixed by #567
Closed

Optimize large table runtime with incremental models #524

pnadolny13 opened this issue Jan 18, 2023 · 2 comments · Fixed by #567

Comments

@pnadolny13
Copy link
Contributor

The event telemetry dbt models take a long time to rebuild every night, one particular model unstruct_event_flattened blocks everything downstream for almost an hour. We can easily make these speed up by using incremental models.

Its not an immediate issue since we only use an x-small warehouse so the cost is low and we only refresh once a day but it would hugely benefit the days where we need to rerun failed jobs, or refresh after a deployment.

@pnadolny13
Copy link
Contributor Author

To follow up on this - it ended up leading to a 38% decrease in runtime. So its completes in ~75 mins vs 120. Which is ~22.5 hrs a month @ $6 per hour = $135 per month savings.

The total node runtime increase by about 5 mins but the parallelization allowed the queries to distribute better and optimize the available threads better. Theres still more incremental logic we can add to reduce this further but this is a good start.

cc @tayloramurphy

@tayloramurphy
Copy link
Contributor

Amazing @pnadolny13 nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Planned
Development

Successfully merging a pull request may close this issue.

2 participants