I assume that you're familiar with explain.depesz.com and paste.depesz.com services.
From today they are also available as services in TOR, using respectively: explain4pg4j5wbw.onion and paste4sql64vzyry.onion (of course you need to have TOR Browser or some other way to browse darknet).
Why I did that? Well, I believe that TOR is one of the greatest inventions ever, and I'd like to do something so that it will be less associated with drugs, porn, or other illegal activities. Don't realistically think that there will be many people using TOR to access my Pg-related services, but it is a thing that I could have done, so I did it.
While working on it, I also updated pgFormatter code under paste-site to newest version.
Continue reading explain.depesz.com, paste.depesz.com – TOR announcement and some updates
Some (long) time ago, someone on irc suggested that I add option to keep track of optimizations of queries.
Sorry, I forgot your name, and the mails disappeared in some crash.
Anyway – right now, when you are on some plan page, you can press “Add optimization" button, and you will be redirected to index page, but when you will add plan there, it will be understood to be plan from optimization of the query. Like this one.
You can have any number of optimizations per plan, and when viewing plan that has optimizations, or is an optimization of earlier plan – you will see this above plan table.
Whether you'll use it – it's up to you. Someone wanted it, and it looked like sensible thing to add, so there it is 🙂
Continue reading New change on explain.depesz.com
Long time ago I wrote first version of explain.depesz.com. Since then I gradually improve it. But, what was lacking was a way to paste queries too – explain.depesz.com handles explains, but not plain queries.
Now this has changed. I created new site: paste.depesz.com which allows for sharing queries.
Thanks to pgFormatter it also does query pretty-printing (which is not something readily available on other paste sites).
Obviously, code to the site is publicly available in GitHub repo.
Now, goes my request – if you have designer skills, I would greatly appreciate someone that could make the site nicer (prettier, more responsive). My CSS/JS knowledge is pretty limited, and I'm happy anyway about what I did with the look right now, but if you could make it nicer/prettier, that would be amazing.
Have fun, and if you have any feature requests, please post them in here…
As of now, main table that stores explain.depesz.com plans is partitioned.
This shouldn't be, at all, visible for users of the site, but if it would, please let me know (on irc, or via email).
In case you're wondering why, after all there is only ~ 270,000 plans – the reason is very simple. Splitting the data into multiple tables makes maintenance tasks (vacuum, dump) much simpler and easier.
Quite a long time ago (in October), Oskar Liljeblad reported a bug in anonymization. Namely – group keys were not anonymized.
You can see example of such plan here.
I finally got to it, fixed the bug, pushed new version to live site, and now such plans will be correctly anonymized.
Thanks Oskar, and sorry for long delay.
Continue reading explain.depesz.com – new change and some stats
Some time ago I was contacted by Adam Smith – he pointed out that subquery names in “Subquery Scan" nodes were not properly anonymized.
Now, they are, which you can see in here:
While working on it, I also added (helpful?) links from node types to my blogposts about reading explain output – Explaining the unexplainable.
Continue reading explain.depesz.com changes and new stats
Some time ago Karl Bartel asked me to add ability to parse plans that were done using “ANALYZE ON, TIMING OFF". Initially I didn't see the point, but he said that explain.depesz.com allows him to hide parts of the tree, and other columns (aside from actual time) are extracted and presented in more readable way.
OK. Got his point, but was busy. Finally today committed:
Now – plans made using analyze without timing work nicely. In process also fixed display of nodes that never were executed.
And now time for some bragging, a.k.a. statistics:
Continue reading New functionality on explain.depesz.com, and some statistics
This time the changes do not modify how the website works. But they make it simpler to deploy clone of explain.depesz.com on your own server.
Thanks to Petr A. Korobeinikov I got full automation for setting test/development/internal clones of the site. What was done previously manually, now can be done very fast using Vagrant or Puppet.
Great stuff, thanks Petr.
Continue reading Changes in explain.depesz.com
There are some cases where you might want to get your own copy of explain.depesz.com. You might not trust me with your explains. You might want to use it without internet access. Or you just want to play with it, and have total control over the site.
Installing, while obvious to me, and recently described by John Poole, is not always 100% clear. So, I decided to write about how to set it up, from scratch.
Continue reading How to install your own copy of explain.depesz.com
Uploaded new version to the server – straight from GitHub. There are two changes – one visible, and one not really.
The invisible change, first, is one for people hosting explain.depesz.com on their own. As you perhaps know you can get sources of explain.depesz.com and install it on any box you want (as log as you can get there PostgreSQL, Perl, and some perl modules). While working on it on my own, I figured I could use a way to tell which version of module-xxx the site is running right now. So I build /info page (which is inaccessible to everyone, but manually-marked admins), which lists versions and interesting paths.
The second change – the one visible to users, is that I made explain.depesz.com commify numbers. Sometimes it can be hard to read value like 12325563, but now it will be displayed as 12,325,563 making is simpler to grasp.
This second change was suggested by Jacek Wielemborek, so if you hate it – blame him. Of course if you love the change – it's all on me 🙂
Hope you'll find it helpful.