Optimize SQL Query — Joins, Cardinality, and Wasted Work
A five-table join that got slow as data grew: establish cardinality first, check each join strategy against the data shape, and hunt the fan-out doing wasted work.
View Resource →Build evidence-based SQL optimization prompts — goal, platform, and the evidence you have turn into a query tuning contract.
A five-table join that got slow as data grew: establish cardinality first, check each join strategy against the data shape, and hunt the fan-out doing wasted work.
View Resource →"Optimize this query" gets generic indexing advice. The optimization contract demands evidence: real bottlenecks, justified indexes with their write tax, and no invented plans.
View Resource →Optimize what the engine does, not what the SQL looks like: cost concentration, estimate-vs-actual gaps, and plan warnings — with forensic evidence rules.
View Resource →Map every predicate, join, and sort to the index that serves it — or doesn't. Composite order rules, covering decisions, and the write tax nobody mentions.
View Resource →EXPLAIN shows type=ALL on a 1.2M-row table: full scan on every search. MySQL optimization with InnoDB clustering realities, version-aware optimizer limits, and covering reads.
View Resource →An 11-minute report that reads two years of orders to return 24 rows: the rows-read to rows-returned ratio is the target — filters pushed down, pre-aggregation costed honestly.
View Resource →A real plan with the story inside: estimate says 42 rows, actual is 51,840. PostgreSQL analysis grounded in the plan — stale statistics, bloat, planner costs, and the index arsenal.
View Resource →Queries that were instant at launch and crawl a year later: scale-aware investigation of work that grows faster than the data, before it owns the server.
View Resource →At 240M rows and growing: keyset pagination over OFFSET, partition pruning, and the PostgreSQL specifics — analysis aimed at the scale the table will reach, not the scale it passed.
View Resource →Fast for most customers, 30x slower for the largest two — the parameter sniffing signature. SQL Server tuning with actual plans, clustering-key economics, and CONVERT_IMPLICIT hunting.
View Resource →