All Forums Database
nikhilaggarwal 7 posts Joined 03/12
26 Dec 2014
BTEQ Command to execute sqls only to generate explain plan

Is there any BTEQ command which can be used to generate explain plan whenever I provide sql to it.
I have got around 200 sqls to analyse. Instead of fetching explaining plan one by one for each I would like to set BTEQ to generate explain plan whenever it gets a sql.
I dont want to use SQL Assistant to generate and export Explain plan to a file. 

Raja_KT 1246 posts Joined 07/09
26 Dec 2014

Do you have Visual Explain?
Another way, not so nice, is write a unix script, where you can store your sqls in control file with pointers and comments #. Call a script for that sql you want as parameter. This may or may not suit you well.

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

agnitc 9 posts Joined 11/14
28 Dec 2014

I believe using a script we can append the explain to every sql and then we can run the bteq calling the newly built file as  Raja Sir said

nikhilaggarwal 7 posts Joined 03/12
29 Dec 2014

Yeah, I can do that. Infact I have already done that but was thinking to use bteq command to give "Explain Plan" of a sql ( even if we did not prepend EXPLIAN to sql).
Anyways Thanks all for your inputs.

You must sign in to leave a comment.