Nice, but would be great if it could show it as a Gantt Chart too. The current display shows everything starting at the same time, so doesn’t estimate the total wall clock time.
Now are there similar explainers and visualizers for MySQL and Presto?
> The pev project was initialy written in early 2016 but seems to be abandonned since then. There was no activity at all for more than 3 years and counting though there are several issues open and relevant pull requests pending.
isqlw (aka SQL Query Analyzer), the client for Microsoft SQL Server 2000 had an amazing visual explain tool. To this day, that's probably my favourite ever GUI SQL client, it was just so damn responsive and well-thought-out. I never made the switch to SQL Server 2005 so never really properly tried the later Visual Studio-esque version, but it seemed slow by comparison.
Eh, except this tool seems to obscure some pretty useful information. It's certainly a nicer to look at thing, but the removed information about query portion detail is pretty vital to quickly working out issues.
Sorry - my comment was a bit poorly worded. That information is now obscured away from easy visibility being behind a click - it is still there behind the click (not entirely removed) while being removed from a surface view.
These are great! I'm in a position where I have to teach people about query optimization often enough and using some combination of these visualizations will help get the point across in a more friendly way. So far screenshots of the explains and then walking through them have been okay but I think its more of a passive acknowledgment that explains are a thing versus actually a deep understanding. Hopefully this will help me cross the gap.
Related question: does anyone know of anything similar for SQLite? Best I've found is SQLite Browser, which just splits the output of EXPLAIN QUERY PLAN into a table.
I haven't seen one, but SQLite doesn't really support very complex indexes. If your database has gotten complex enough to warrant studying query plans and tuning queries, it might be time to consider switching to a more powerful RDBMS.
33 comments
[ 3.2 ms ] story [ 72.8 ms ] threadFor a complete example, see this codesandbox.
https://codesandbox.io/s/pev2-ry2dd
Pick a sample plan and submit.
Now are there similar explainers and visualizers for MySQL and Presto?
haven't tried it myself.
https://www.percona.com/blog/2018/03/01/visualize-this-mysql...
https://github.com/dalibo/pev2/#disclaimer
> The pev project was initialy written in early 2016 but seems to be abandonned since then. There was no activity at all for more than 3 years and counting though there are several issues open and relevant pull requests pending.
Screenshots:
https://www.sqlshack.com/wp-content/uploads/2016/09/machine-...
There's also Azure Data Studio for a cross-platform version: https://docs.microsoft.com/en-us/sql/azure-data-studio/what-...
In the meantime, and even with the help of vue.js, front dev. remains such a mess :(
(But what you did is just pretty cool)
https://explain.depesz.com/ is an awesome tool too, and I especially love the "Explaining the unexplainable" series: https://www.depesz.com/tag/unexplainable/
i personally always loved pgadmin's graphical explain. i'm pretty visual and for me it is ideal to get a good first intuition on what's happening.
Related question: does anyone know of anything similar for SQLite? Best I've found is SQLite Browser, which just splits the output of EXPLAIN QUERY PLAN into a table.