PostgreSQL Query Rewriting Techniques The previous articles in this series covered performance problems you fix by adding indexes, restructuring joins, or tuning memory. This one is about the queries where the plan is "fine" — every node is doing something reasonable — but the query itself is asking the wrong question, producing unnecessarily large intermediate results or forcing the planner dow
Liquid syntax error: Variable '{{% raw %}' was not properly terminated with regexp: /\}\}/
How intentional loading decisions keep your app fast at scale. Frontend performance is not a late-stage cleanup task. It’s not tech debt. It’s a set of decisions we make every day while we code — what we load, when we load it, and how we render it. The answer depends on the importance of the code, its size, and when the user actually needs it. Get that wrong, and the browser pays for everything
This section is the map for the rest of the book. The five stages introduced in the 1.1 chapter overview (parse, analyze/rewrite, plan, portal, execute) are traced here through the actual code: which functions implement each stage, and in what order they get called. The mechanics of each of the five stages are unpacked in later chapters. Here, only the skeleton matters: how a backend starts up, ho
PostgreSQL Internals · Chapter 1 Query Processing Suppose a client sends SELECT * FROM users WHERE id = 1. The path that single line travels before coming back as a result row is longer than you might expect. Inside the PostgreSQL backend, that SQL goes through a five-stage pipeline. Backend entry and dispatch. The backend receives the message from the client and decides which processing path it s
I’m going on a short vacation this week, so this post is coming out a bit earlier than usual. I actually had a different, more “useful” topic in mind — something educational, something responsible. But then I came across this fascinating article: I don’t like Tailwind. Sorry not sorry written by @freshcaffeine , and I couldn’t get it out of my head. So I decided to write a response instead. I actu
What Is an Atomic Transaction? Before we begin, let’s define atomic transaction clearly: “It is a protective wrapper around multiple state updates that guarantees the whole operation either succeeds completely or has no effect at all.” Inside an atomic transaction, you can perform multiple set() calls, and even cross multiple await boundaries. Only when the entire operation succeeds do we commit
The "Unsharable" Dashboard Problem Imagine this common B2B SaaS scenario: An executive opens your analytics dashboard. They spend three minutes configuring the data—they filter the status to "Active," set the date range to "Last 30 Days," sort the table by "Highest Revenue," and navigate to Page 4. They copy the URL and Slack it to their team lead. The team lead clicks the link, but instead of see