Databases
Post #7173 · source on Telegram
Born Just In Time To Optimize SQL Queries
Description
Pixelated meme using the 'gnome child' character from RuneScape, shown in a psychedelic, vaporwave-style setting staring at an ASUS monitor. The text reads: 'BORN TOO LATE TO EXPLORE THE EARTH / BORN TOO SOON TO EXPLORE THE GALAXY / BORN JUST IN TIME TO OPTIMIZE SQL QUERIES.' The last two lines are in highlighted/banner text style. The meme uses the classic existential format to contrast grand civilizational endeavors (exploration, space travel) with the mundane reality of a developer's daily work: tuning database performance
Use J and K for navigation
Comments
11Comment deleted
The great filter of civilization isn't nuclear war or climate change - it's a missing index on a 500 million row table that nobody noticed until Black Friday
Humanity's great explorers used a compass and the stars. I use `EXPLAIN ANALYZE` and a prayer that the query planner finally decides to use the index I've been hinting at for the last three migrations
Sure, Magellan circumnavigated the globe, but did he ever drop a redundant composite index and reclaim 300 µs on a hot path?
While your peers are debating microservices vs monoliths, you're still explaining to the CTO why that innocent-looking SELECT * with seven JOINs is why the quarterly reports take longer to generate than it took NASA to calculate the moon landing trajectory
The cruel irony of our generation: we possess computational power that would make NASA's Apollo engineers weep, yet we spend our days adding composite indexes and rewriting subqueries as CTEs. At least when you finally get that O(n²) join down to O(n log n), you briefly feel like you've discovered a new planet - until the next sprint planning meeting reminds you there are 47 more slow queries in the backlog
Galaxies can wait, but that non-sargable predicate in prod? It's pulling us all into a performance black hole
We didn’t get starships, but watching EXPLAIN ANALYZE finally swap a misestimated nested loop for a hash join and drop the p99 by 300ms feels like discovering a new continent
EXPLAIN ANALYZE is my telescope - every missing index is a black hole swallowing SLOs
for anyone dealing with it currently https://www.sommarskog.se/query-plan-mysteries.html Comment deleted
After skimming through, it seems almost useless outside of SQL Server. Comment deleted
should have mentioned MSSQL-only every RDMS has some unique and quirky way to make you hate it Comment deleted