set explain on question
Posted in 1999
Topics: Stored Procedures & SPL, Platform-Specific Issues
How can I get set explain on results for a stored procedure?
If I include it at the time the procedure is created, will the results be
accurate:
set explain on;
create procedure dgp_chklock_lookup(
(procedure code here)
HP-UX 10.20
OnLine 7.23.UC1
Thanks, Dianne
Whatcha need to do is include the following code in the body of the stored
procedure:
set debug file to "your_output_file";
Then, at the point in the code you want to begin outputting debug info,
insert the following:
trace on;
Then insert the following to turn off debugger output:
trace off;
Be advised that the debugger substantially slows down the execution of your
stored procedure, and produces a substantial amount of output. So you don't
want to leave this on in production. For more information, refer to your
Guide to SQL.
HTH,
Milton J. Vidrine, Jr.
dianne.pendleton@autodesk.com wrote:
> How can I get set explain on results for a stored procedure?
>
> If I include it at the time the procedure is created, will the results be
> accurate:
>
> set explain on;
> create procedure dgp_chklock_lookup(
> (procedure code here)>
> HP-UX 10.20
> OnLine 7.23.UC1
>
> Thanks, Dianne