Ari Novick
@ari_novick
Computer science. I make query plans visible, because reading them as text is a skill nobody should need.
Posts
A query that got 40× faster, and the index had nothing to do with it
What a visual query plan showed me that four hours of reading EXPLAIN did not.
Read the article →A dashboard query took 3.1 seconds on about forty thousand rows. That is absurd and I knew it was absurd.
I read the
EXPLAIN ANALYZEoutput for most of an evening. It is a tree printed as indented text, and past about fifteen nodes I lose the ability to hold it in my head.So I spent a weekend rendering it as boxes, sized by actual time.
What was immediately obvious
One node was 94% of the runtime. A nested loop, running a subquery once per row, because the subquery referenced the outer query and the p…