Multiple Sessions Setting in Teradata Tools and utilities

Tools
Enthusiast

Multiple Sessions Setting in Teradata Tools and utilities

I see that we can set the number of sessions in BTEQ. How does this multiple session setting work in BTEQ?

If I run a Batch script in BTEQ with number of sessions set to more than 1, Will I see the benefit in query run-time? How does 'set sessions ' setting work in BTEQ and in general how does multiple session setting work in Teradata?
4 REPLIES
Teradata Employee

Re: Multiple Sessions Setting in Teradata Tools and utilities

In general, multiple sessions allow for parallelism when transferring data between the client and the Teradata database.

In the case of BTEQ, multiple sessions are only useful in conjunction with .REPEAT, to allow multiple .IMPORT records to be processed concurrently. The request corresponding to each input record will be assigned to one of the sessions, round-robin.

Re: Multiple Sessions Setting in Teradata Tools and utilities

Hello, I have one archive with this:

.set sessions 4

.logon tdpid/usr,pwd

.repeat 4

call sp1();
call sp2();
call sp3();
call sp4();

.quit

But they aren´t run in parallel. How can I do execute some stored procedures in parellel using BTEQ?

Thanks.
Teradata Employee

Re: Multiple Sessions Setting in Teradata Tools and utilities

Your script says to call SP1 four times; then call SP2, SP3, SP4 each one time, in sequence. Only the four calls to SP1 are eligible to use the parallel sessions.

To run four different stored procedures in parallel, run four BTEQs.

Re: Multiple Sessions Setting in Teradata Tools and utilities

Ok, thank you.