Re:Postgres Query Plan Visualization
by colanderman on Sunday January 24, 2016 @01:32PM
(#10963413)
\a
\t
is what you want. (\a, unaligned mode, removes the + characters, and \t, tuples only, removes the header and footer.)
The demo at http://tatiyants.com/pev/#/plans works.
Unfortunately it has some glitches.
Hints for using it:
* In psql use \o plan.txt to redirect the output of explain to a file. It will be a long output because you must use EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) and copying it from the terminal won't be fun.
* Remove the first two lines (header) and the last two (footer) leaving only the json data. Remove all the + characters at the end of every line. Suggestion to the author: the tool should handle that.
That said, it works. It really is much clearer than the output of explain in the terminal and as a result I'm googling how to speed up sort now. Thanks.