Query Doctor
banner
querydoctor.com
Query Doctor
@querydoctor.com
Indexing Challenge #1: Find the most efficient way to retrieve the two records for the game "Dig Dug" that have a score between 10,000 and 12,000. "Most efficient" means "the fewest yellow nodes". Deleting records is cheating 🤓

Playground: app.querydoctor.com/ixr/share/ua...

Good luck!
March 20, 2025 at 11:21 PM
This @mattermost.bsky.social article is fascinating, row value comparisons are nifty! Interesting to see IndeX-Ray reveal the unbounded index scan. The other query correctly bounds the index scan to minimize it.

mattermost.com/blog/making-...

Playground: app.querydoctor.com/ixr/share/Zl...
March 17, 2025 at 8:09 PM
Can the code underlining approach used by IDEs be applied to show indexing problems directly on SQL text? @simp.engineer thinks so!

See how his latest work magically surfaces scan type details from query execution on the relevant clauses in the query itself: app.querydoctor.com/ixr/share/w3...
March 6, 2025 at 4:40 PM
The conditions shown are also specific to the stage on the screen. A condition on games.genre is only shown when looking at the stage retrieving data from games and NOT for retrieving from the scores table. Bonus: conditions inherited from JOINs are there too!

app.querydoctor.com/ixr/share/Fb...
February 7, 2025 at 5:48 PM
What better first post than to announce a feature? How the DB handles the WHERE clause of a query is now shown directly in the diagrams! Easily see how the logic of SQL is translated into a plan the DB can use to find the results.

Check it out an example here: app.querydoctor.com/ixr/share/QQ...
February 7, 2025 at 5:07 PM