Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Plan to simple TEXT Plan #92

Open
goranschwarz opened this issue Feb 19, 2021 · 2 comments
Open

XML Plan to simple TEXT Plan #92

goranschwarz opened this issue Feb 19, 2021 · 2 comments

Comments

@goranschwarz
Copy link

Any chance this project (in the future) also can compose a "simple text" plan from the XML Content
like the output from set statistics profile on or similar!

That will be really helpful if you want to include a "showplan" output in any automatic warning mails (because mail content normally cant run JavaScript)
I have a monitoring tool (DbxTune -- https://github.com/goranschwarz/DbxTune), and for SQL Server I use your tool to visualize captured showplans!
But it also sends various alarms (vi mail or other methods), and in there I would like to have a "simpler text" representation of the plan, just to get a hint of what to plan does!

What do you think about this?

@goranschwarz
Copy link
Author

As an "inspiration"... here are some examples from other vendors!

Oracle Explain output:
https://blogs.oracle.com/optimizer/how-do-i-display-and-read-the-execution-plans-for-a-sql-statement

Postgres Explain output:
https://thoughtbot.com/blog/reading-an-explain-analyze-query-plan
https://www.postgresql.org/docs/9.4/using-explain.html

Sybase (or SQL Server version 4.2 and possibly 6.0 and 7.0):
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00743.1502/html/queryprocessing/queryprocessing45.htm

And another thing which might be of interest is to "visualize" Sybase XML Plans in the same way as you currently do (with html-query-plan)
This is probably "out of scope" ... but for me it would be of interest :)
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1570/html/blocks/blocks213.htm

@goranschwarz
Copy link
Author

A easier alternative to "print" the plan as plain text, to include it into mail etc, would be to use "classic" html tables (which wont depends on JavaScript to draw the "arrows")
See here for an example: https://blogs.sap.com/2013/06/15/graphical-html-query-plans-in-ase-157-sp100/

It sure isn't as good looking as the current output from html-query-plan, but alot of the XSLT code will be reusable
(I tried to look at qp.xslt, but didn't really understand how to rewrite it into wrapped html tables)

I attached two HTML output files from a similar example as in the link above if it helps you :)
ASE.html_showplan.html.txt
ASE-2.html_showplan.html.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants