Skip to content
RED SAGSkills
mediumData Engineer interview question

A dbt model that used to take 5 minutes now takes 2 hours. How do you troubleshoot it?

What the interviewer wants to hear

  • Check what changed: data volume, code, warehouse size, concurrency
  • Read the query profile or explain plan
  • Look for exploding joins, missing filters or spills
  • Use partition pruning and clustering
  • Make the model incremental if it rebuilds full history

Model answer

I start with what changed: a recent code commit, much more data, a smaller warehouse, or other heavy jobs running at the same time. Then I open the query profile in Snowflake or BigQuery to see which step takes the time and how many rows go in and out. Common causes are a join that explodes because a key is no longer unique, a filter that stopped pruning partitions because a function wraps the date column, or memory spilling to disk. I check the join keys for duplicates and fix the grain. I make sure filters use the partition or cluster column directly. If the model rebuilds years of history every run, I change it to an incremental model that only processes new or changed rows. After the fix I add a test or alert on run time, so a slowdown is caught early.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Data Engineer questions