SQL

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.

Stop Choosing Between SQL and Your Code. Steal This Clojure Secret.

The SQL vs. ORM debate is a distraction. The real enemy is the cognitive tax of switching between your programming language and your database language. HugSQL solves this not by hiding SQL, but by making it a native, readable dialect inside Clojure. It’s a masterclass in eliminating context-switching friction for any developer.

I Spent 15 Years in Excel Hell. Here’s How Postgres (and AI) Finally Set Me Free.

After 15 years of using Excel as a database, I finally migrated to Postgres in a weekend. The key wasn’t learning SQL—it was using AI to bridge the gap. This article explores why Excel’s zero-friction becomes a fatal flaw at scale, how AI now makes databases accessible to everyone, and why you should stop suffering and make the switch.

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.

Stop Letting Your AI Agent Write Raw SQL. Here’s the Only Safe Way.

Filtersql is a dependency-free Python library that compiles JSON payloads into safe, parameterized SQL. It eliminates SQL injection risks when AI agents or APIs dynamically query databases. No ORM, no bloat—just a minimal compiler that lets your AI order from a safe menu instead of writing raw SQL. A must-read for anyone building LLM-powered applications.

Postgres 19 Just Killed the Graph Database (And You Didn’t Even Notice)

Postgres 19 introduces native property graphs directly into the SQL kernel, eliminating the need for separate graph databases for most applications. This isn’t just a new feature—it’s a quiet paradigm shift that forces developers to rethink data modeling, architecture complexity, and operational overhead. The era of juggling relational and graph stores is ending.

I Stopped Using ORMs. Here’s Why You Should Too.

ORMs promise simplicity but deliver complexity, hiding performance pitfalls and making you feel powerless. The real power lies in learning raw SQL—and then going even deeper to storage engines. This article challenges the industry’s reliance on high-level abstractions and offers a path to genuine mastery.