Currently I am executing SQL statements one by one as below,
bteq << EOB
.OS rm -f file.sql
.SET FORMAT OFF
.SET TITLEDASHES OFF
.SET WIDTH 999
.export data file=file.sql
.SET RECORDMODE OFF;
and it is taking more time.
Is there any way we can speed up the execution by making the execution process parallel in BTEQ.
You can try as below set more sessions and as a multi statment request -
.set sessions 8;
@SriLaxmi, I do not think this will make the sql's run in parallel. instead it will increse the number of sessions connecting to Teradata and will execute each query faster.
@Muthu: Are the sql's interdependant like the output of the preceding query becomes the input for the current query etc.. If not then create multiple BTEQ scripts with single sqls and you can call all of them in a Shell script in parallel.
Hi Krishna, increasing the sessions would make the time lesser which is the objective.
And can you clarify if the sqls are not dependet and written in MSR fashion (semicolon before the next sql) it would execute all the SQLs in parallel in the same transient journal. (yes we need see if should fall under spool errros)