Setting Values for the MaxSessions Attribute
Consider the following factors when specifying a value for the MaxSessions attribute:
If no value is set for MaxSessions, the operator attempts to connect to one session
per available AMP.
The DDL, ODBC, and SQL Selector operators are limited to a single concurrent session,
that is, one session each per single-step job, or one each session per step in a multi-step
job.
If the value of the MaxSessions attribute for an operator is smaller than the number
of operator instances, the job will abort.
If the value of MaxSessions is set to a number greater than the number of available
AMPs, the job runs successfully, but logs on only as many sessions as available AMPs.
For some jobs, especially those running on systems with a large number of AMPS, the
default session allocation (one per available Teradata Database system AMP) may not
be advantageous, and you may need to adjust the MaxSessions attribute value to limit
the number of sessions used. After the job has run, use the evaluation criteria shown
in “Strategies for Balancing Sessions and Instances” on page 85 to help adjust and optimize the MaxSessions setting.
The SQL Inserter operator supports only one session.
The Stream operator uses an SQL protocol, so it is not seen as a “load job” by the
Teradata Database. Therefore, Stream operator connects to as many sessions as requested,
up to the number of sessions allowed by the Teradata Database.
The Effect of Operator Instances on the MaxSessions Value
The number of sessions specified by the value of the operator MaxSessions attribute
are balanced across the number of operator instances. For example, if the Update operator
is defined with two instances, and the MaxSessions attribute is set to 4, each instance
of the defined Update operator will run two sessions, provided there are at least
four AMPs on the system.
An Update operator uses a maximum of one session per available AMP on the Teradata
Database system. This means that if your Teradata Database system has ten available
AMPs, the MaxSessions value must be less than or equal to ten.
Examples of How the MaxSessions Value is Processed
If there are ten maximum sessions defined for an operator, the following combinations
of instances and sessions are possible:
One instance with ten sessions
Two instances with five sessions each
Three instances: two instances with three sessions and one instance with four sessions
Four instances: two instances with three sessions and two instances with two sessions
Five instances with two sessions each