Waiting for 8.5 – Machine readable EXPLAIN

After very long discussions, on 10th of August, Tom Lane committed patch by Robert Haas:

Log Message:
-----------
Extend EXPLAIN to support output in XML or JSON format.
 
There are probably still some adjustments to be made in the details
of the output, but this gets the basic structure in place.
 
Robert Haas

Continue reading Waiting for 8.5 – Machine readable EXPLAIN

explain.depesz.com – update

I just updated explain.depesz.com with 2 new interface features:

  • When you put mouse cursor over node, it will mark direct child nodes with
  • When you click on node, all child nodes (even indirect) will be hidden, and the node you clicked on will be marked with

Both features are directed towards people who analyze longer plans – ability to hide parts or just visually see what the Nested Loop is calling in 2nd stage greatly helps me see the flow of query – you can test it, for example, here.

By the way – BIG THANK YOU for Metys for help on it (well, actually, for doing it).

explain.depesz.com – update

I just modified the internals of explain.depesz.com. Now, it finally stores the plans in database (previously it stored the plans as files in dedicated directory).

Effect for enduser is just that history page should load faster.

But, having the data in database makes it possible to add more features.

One such feature is already added – ability to explain plan, but not list it on history page.

Right now, when you add new plan, you can specify if you want it to be listed with other previous explains – default value is “yes". But if you don't want just anybody to be able to click his way to your plan – there is option for it.

For obvious reasons all previous plans are marked as public now. If you want it to be changed, please contact me – we can probably do something about it.

And as last thing: I would like to express my big THANK YOU to all of you who use explain.depesz.com.

(side note: Catalyst is really cool)

explain.depesz.com – update

I just updated explain.depesz.com with the newest explain-parsing library version (Pg::Explain v 0.09).

This version will hit CPAN mirrors in next couple of hours.

Changes:

  • Fix exclusive time calculations
  • Make PE::Node understand Bitmap scans (heap and index)
  • Add proper handling of nodes that were “never executed"
  • Add ->is_analyzed method to PE::Node to make it easy to distinguish between EXPLAIN and EXPLAIN ANALYZE nodes

explain.depesz.com.

Long time ago I wrote small program to filter EXPLAIN ANALYZE output, and add summary of time.

A bit later (I guess, I don't recall exact time line, it could have been earlier) Michael Glaesemann started explain-analyze.info – cool tool for checking what might be wrong with given plan.

I'm not really happy with the emphasis Michael put on bad rowcount estimates, so I decided to write my own tool. Enter explain.depesz.com.

Basic idea is: paste your explain analyze plan, and see the output. You can click on column headers to let it know which parameter is the most important for you – exclusive node time, inclusive node time, or rowcount mis-estimate.

It is definitely not perfect. I know of at least 1 bug now, and will fix it in not-distant future.

But, as for now – you can test it, play it, or simply use it. If you'd like to change/fix something – sources are freely available. Just be warned – it's Perl ;-P