# Optimizing dbt Models for Large-Scale Data Warehousing - Emmanuel Katto

**URL:** <https://discourse.getdbt.com/t/optimizing-dbt-models-for-large-scale-data-warehousing-emmanuel-katto/14229>\
**Category:** In-Depth Discussions\
**Tags:** dbt-core\
**Created:** [July 12, 2024, 10:52am UTC](https://discourse.getdbt.com/t/optimizing-dbt-models-for-large-scale-data-warehousing-emmanuel-katto/14229 "2024-07-12T10:52:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanuelkatto](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/emmanuelkatto/32/4252_2.png) [@emmanuelkatto](https://discourse.getdbt.com/u/emmanuelkatto)\
**Post date:** [July 12, 2024, 10:52am UTC](https://discourse.getdbt.com/t/optimizing-dbt-models-for-large-scale-data-warehousing-emmanuel-katto/14229/1 "2024-07-12T10:52:28Z")

</div>

Hi everyone, I am Emmanuel Katto. I’m working on a large-scale data warehousing project using dbt, and I’m running into performance issues with my models. Specifically, I have a large number of tables with millions of rows, and my dbt models are taking a long time to run and generate. I’ve tried various optimization techniques, but I’m still not seeing the performance improvements I need. I’ve tried various optimization techniques, such as:

```
Breaking down large tables into smaller chunks
Using subqueries instead of joins
Optimizing my SQL queries using indexes and statistics
Using dbt's built-in optimization features, such as materialized and partitioned

```

However, I’m still struggling to achieve the performance I need. Can anyone provide some best practices or advanced tips for optimizing dbt models for large-scale data warehousing?

Thanks!  
Emmanuel Katto
