Oct 22, 2018

MySQL Pager - Output Handling

Using "PAGER" or \P you can control output handling. Instead of having 10k lines scrolling by you can write everything to a file or use "less" to scroll through it for example. To use less issue

pager less
Page output into a script
pager /home/hdgem/myscript.sh
Or if you have Percona installed get a tree-like "EXPLAIN" output with
pager mk-visual-explain

and then run the "EXPLAIN" query.