Query Optimization

Stop Using COUNT(DISTINCT). Your Database Is Begging You.

COUNT(DISTINCT) is the most expensive query in your stack, forcing your database to track every unique value just to deliver a number that’s approximately right anyway. The real problem isn’t the database — it’s the cultural assumption that exact answers are always required. Most business decisions don’t change based on whether that count is 4,991,203 or 5,000,000. Stop burning compute on false precision and start using smarter approximations.

DuckDB Just Became the Universal SQL Dialect (And Nobody Noticed)

A new DuckDB transpiler allows you to write DuckDB SQL once and run it against any database—PostgreSQL, Snowflake, BigQuery—with full predicate pushdown. No data movement, no dialect rewriting. DuckDB becomes a universal query planner, not an execution engine. This is a paradigm shift for data engineers tired of context-switching between SQL dialects.