So, lately I have been thinking about integrating explain.depesz.com with psql. Currently, you have to run explain, copy the output, switch to webbrowser, go to explain.depesz.coma> site, paste output, click submit. It's not that it's a lot of work, but it can be simplified.
One of the features that is actually disliked is anonymization. But, regardless of the dislike – it has some users. And one of the user mailed me with information about a bug – namely – foreign table file names were not anonymized.
So, I wrote a patch, tests, released new version of underlying parsing library.
Couple of days ago Filip contacted me and sent a patch that stopped anonymization of typecasts.
I thought about the patch, and what it achieves, changed it's internals, but kept the effect. And today, it got released.
On 22nd of September, Tom Lane committed patch:
Make EXPLAIN ANALYZE report the numbers of rows rejected by filter steps. This provides information about the numbers of tuples that were visited but not returned by table scans, as well as the numbers of join tuples that were considered and discarded within a join plan node. There is still some discussion going on about the best way to report counts for outer-join situations, but I think most of what's in the patch would not change if we revise that, so I'm going to go ahead and commit it as-is. Documentation changes to follow (they weren't in the submitted patch either). Marko Tiikkaja, reviewed by Marc Cousin, somewhat revised by Tom
Just updated explain.depesz.com site with new functionality – when showing parsed plan, there is new tab “stats". In there you can see some basic statistics of the query, used types of nodes, and tables that were used by it.
There are probably some problems with stats (it's new functionality, so bugs are imminent), but
As usual, some stats need to be added 🙂
- Total count of plans in database: 18127
- Count of private (not listed on history page) plans: 6965
- Count of anonymized plans: 166 (this feature proved to be much less used than I thought it will be)
- Since (including) May 2011, there are more private plans added than public ones. In June – 58.9% of all plans were private.
First of all, as of today, I added new feature, called anonymization.
It is for all of the people who are afraid that their plans contain information that they don't want to (or can't) share on the internet.
It works like this:
Today, I released 2 new versions (new features in 0.5, and then quick bugfix in 0.51) of Pg::Explain Perl library.
This is the base of explain.depesz.com – the code that does heavy lifting of parsing plans, and providing them in uniform way (object).
If you like it, please do send some thank you note to Łukasz – he blogs in Polish, but he reads and understands English too.
This change should be a welcome surprise to anyone willing to setup their own copy of the site for top-secret plans from their company – mostly because number of dependencies dropped significantly.
All in all – have fun, and thanks for using the site.
This patch fixes calculation of exclusive time for explain nodes, and the best thing about it is – I didn't write it. It's full patch provided by someone else – Filip Rembiałkowski – my former colleague, friend, and PostgreSQL DBA (not olny PG!).
This is (as far as I recall) first patch that was provided to me for this library, and I'm really grateful for the contribution.
New version of Pg::Explain will hit CPAN mirrors shortly (it's already uploaded, now we're waiting for CPAN mirrors to get it).
When I was updating it, I checked state of database. And I learned that explain.depesz.com is over 2 years now! Some stats follow.