C.W.K.
Stream
Lesson 05 of 06 · published

Cost — When DuckDB Beats Snowflake (and Vice Versa)

~10 min · cost, production, tools

Level 0Curious Reader
0 XP0/47 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

The most-overlooked production concern

Cloud warehouses are wonderful and they bill by the second. The same workload can cost $50 a month on a single-machine DuckDB stack and $5,000 a month on Snowflake — or vice versa, depending on shape. Knowing which is which is part of being a real data engineer in 2026.

When DuckDB / Polars on a single machine wins

  • Data is < 500GB on disk and a single fat machine fits the workload.
  • Workloads are batch (a few cron-driven jobs per day) rather than constant interactive querying.
  • Concurrency is low (one analyst, a couple of dashboards).
  • You already have or want to own the operational burden.

When a cloud warehouse wins

  • Many concurrent queries from many analysts and BI tools.
  • Data > 1TB or growing > 50% / year.
  • You don't want to run infrastructure (no DBA, no platform team).
  • Need for cross-region replication, deep BI tool integration, automatic scaling.

The middle ground that often wins

DuckDB locally for development and ad-hoc analysis; a real warehouse for production marts that BI tools query. Storage is shared (Parquet on S3 / GCS / R2), and the compute layer is whichever is right for the consumer. This split lets you keep dev costs near zero while production gets the warehouse's concurrency and reliability.

Code

DuckDB-on-laptop reading the same Parquet your prod warehouse reads·python
import duckdb

con = duckdb.connect()
con.execute("INSTALL httpfs; LOAD httpfs;")
con.execute("""
    SET s3_region='us-east-1';
    SET s3_access_key_id='...';
    SET s3_secret_access_key='...';
""")

# Same Parquet, same query, different compute — runs against prod's S3 lake
result = con.sql('''
    SELECT date_trunc('month', order_date) AS month,
           SUM(amount_usd) AS revenue
    FROM 's3://my-warehouse/orders/year=2026/**/*.parquet'
    GROUP BY 1 ORDER BY 1
''').to_df()

External links

Exercise

Pull last month's warehouse cost report (most warehouses have one). For the top 5 most expensive queries / models, ask: would this run on DuckDB on a laptop in seconds? If yes, what's keeping it in the warehouse? Sometimes the answer is correct (concurrency, governance); sometimes it's just inertia.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.