BTEQ Command to execute sqls only to generate explain plan

Database

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. 

Tags (2)
3 REPLIES

Re: BTEQ Command to execute sqls only to generate explain plan

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.

N/A

Re: BTEQ Command to execute sqls only to generate explain plan

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

Re: BTEQ Command to execute sqls only to generate explain plan

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.