Why is SELECT COUNT(*) so slow in PostgreSQL?
MVCC means Postgres doesn't store a row count. Make exact counts cheaper, get instant estimates from the planner, and keep exact counters when you really need them.
#internals#mvcc#performance
Topic
MVCC means Postgres doesn't store a row count. Make exact counts cheaper, get instant estimates from the planner, and keep exact counters when you really need them.
#internals#mvcc#performance
The N+1 query problem: each query takes 1 ms, but there are 301 of them. How to spot it, fix it with eager loading and avoid the cartesian-explosion overcorrection.
#orm#performance#troubleshooting
Execution plans tell you exactly how SQL Server ran your query. Learn which operators matter, how to spot bad estimates and what the warnings really mean.
#execution-plans#performance#t-sql
The single most important physical design decision in SQL Server, explained from first principles — with the queries to prove it.
#indexing#performance#schema-design
Learn to read PostgreSQL query plans node by node — estimates vs. actuals, loops, buffers — and turn them into index and query fixes.
#execution-plans#indexing#performance
Put Redis in front of your database the right way — choose a caching pattern, set sane TTLs, and avoid stampedes and stale data.
#caching#nosql#performance
SQLite can serve real production traffic. Here's how WAL mode changes concurrency, which PRAGMAs to set, and where the limits are.
#concurrency#internals#performance