on 2016 Sep 29 6:34 PM
One of the items listed as a feature in the Introduction to the SQL Anywhere debugger is the following:
"Execute queries You can execute queries when execution is stopped at a breakpoint in a SQL procedure. This permits you to look at intermediate results held in temporary tables, check values in base tables, and to view the query execution plan."
I don't see any explanation anywhere of how to do that. Can anyone provide some insight into this?
Request clarification before answering.
These two articles were written from actual experience capturing plans inside large, complex stored procedures:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, the execution profiler could capture the graphical plan at a breakpoint if there was a feature to do that...
and apparently such a feature exists!...
Execute queries You can execute queries when execution is stopped at a breakpoint in a SQL procedure. This permits you to look at intermediate results held in temporary tables, check values in base tables, and to view the query execution plan.
I'm still researching this and if I find out anything different from the information below I will report back here ....
My current understanding is you can see the result set of any query in the debugger's Query Database utility. So you can execute a select plan( ...) or a select graphical_plan( ... ) and see the result set representation of that. The latter query is less useful because of some severe length restrictions.
So not the answer hoped for. Plan( ) or even a Sort_Plan( ) might fit into the length restrictions of the result set ... but no graphical plan viewer; at least not built into this utility.
As such that much does match the article referenced.
You can run queries from the Debug menu using the "Query Database" pick; when you are in the debugger after hitting a breakpoint.
I do remember seeing the graphical plan part of this demonstrated once but will have to research it more. It may have involved running a query using the graphical_plan function (possibly embedded in the procedure) ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.