Microsoft SQL Server Connector > Mappings and mapping tasks with Microsoft SQL Server Connector > SQL ELT optimization
  

SQL ELT optimization

When you read data from a Microsoft SQL Server source, transform the data, and write the data to a target, you can configure SQL ELT optimization to push the transformation logic to the source or target database system. If the source and target databases are the same, you can configure full SQL ELT optimization for improved performance.
When the Secure Agent applies SQL ELT optimization, it pushes transformation logic to a database. The Secure Agent translates the transformation logic into SQL queries and sends the SQL queries to the database. The database runs the SQL queries to process the transformations.
SQL ELT optimization improves mapping performance when the database can process the transformation logic faster than the Secure Agent. The Secure Agent also reads less data from the database.
The amount of transformation logic that the Secure Agent pushes to the database depends on the database, the transformation logic, and the mapping task. The Secure Agent processes all transformation logic that it cannot push to a database.
When you configure SQL ELT optimization for the mapping, the Secure Agent analyzes the optimized mapping from the source to the target or until it reaches a downstream transformation that it cannot push to the source database. The Secure Agent generates and executes a SELECT statement for each source that has transformation logic pushed down. Then, it reads the results of this SQL query and processes the remaining transformations in the mapping.
Full SQL ELT optimization is enabled by default in mapping tasks.
The Secure Agent can push the following transformation logic to a Microsoft SQL Server source:
Transformations
Supported SQL ELT optimization Type
Aggregator
Source, Full
Expression
Source, Full
Filter
Source, Full
Joiner
Source, Full
Sorter
Source, Full
Union
Source, Full
Router
Full

Full SQL ELT optimization

When the Secure Agent applies full SQL ELT optimization, it pushes all the transformation logic in the mapping to the target database.
Full SQL ELT optimization is enabled by default in mapping tasks.

Source SQL ELT optimization

When the Secure Agent applies source SQL ELT optimization, it analyzes the mapping from source to target or until it reaches a downstream transformation it cannot push to the source database.
The Secure Agent generates and executes a SELECT statement based on the transformation logic for each transformation it can push to the database. Then, it reads the results of this SQL query and processes the remaining transformations.
You can configure a mapping to use source SQL ELT optimization if the source and target reside in different databases. For example, if a mapping contains a Microsoft SQL Server source and an Oracle target, you can configure source SQL ELT optimization to push some transformation logic for processing to the Microsoft SQL Server source.

SQL ELT optimization functions

When you use SQL ELT optimization, the Secure Agent converts the expression in the transformation by determining equivalent functions in the database. If there is no equivalent function in the database, the Secure Agent processes the transformation logic.
The following table summarizes the availability of SQL ELT optimization functions in Microsoft SQL Server:
Functions
SQL ELT optimization Type
ABS()
Source, Full
ADD_TO_DATE()
Full
ASCII() 1
Full
AVG()
Source, Full
CEIL() 1
Full
CHR()
Full
CONCAT() 1
Full
COS()
Source, Full
COSH()
Full
COUNT()
Source, Full
DATE_COMPARE()
Source, Full
DATE_DIFF()2
Full
DECODE()
Source, Full
EXP()
Source, Full
FIRST()
Full
FLOOR() 1
Full
GET_DATE_PART()
Full
IIF()
Source, Full
IN()
Source, Full
INSTR()
Full
IS_DATE()2
Full
IS_NUMBER()2
Full
ISNULL()
Source, Full
LAST_DAY()2
Full
LENGTH() 1
Full
LN()
Full
LOG()
Full
LOWER()
Source, Full
LPAD()2
Full
LTRIM() 1
Full
MAX()
Source, Full
MIN()
Source, Full
MD5() 2
Source, Full
MOD() 1
Full
POWER()
Source, Full
REPLACECHR()2
Full
REPLACESTR()2
Full
ROUND(NUMBER)
Full
RTRIM() 1
Full
SIGN()
Full
SIN()
Source, Full
SINH()
Full
SOUNDEX()
Full
SQRT()
Source, Full
STDDEV()
Full
SUBSTR()
Full
SUM()
Source, Full
SYSTIMESTAMP() 1
Full
TAN()
Source, Full
TANH()
Full
TO_BIGINT
Full
TO_CHAR(DATE) 1
Full
TO_CHAR(NUMBER) 1
Full
TO_DATE()
Full
TO_DECIMAL()
Full
TO_FLOAT()
Full
TO_INTEGER()
Full
TO_NUMBER()
Full
TRUNC(NUMBER)
Full
UPPER()
Source, Full
VARIANCE()
Full
1Applies also in Expression transformations for mappings enabled with source SQL ELT optimization.
2Applies only in an Expression transformation.

SQL ELT optimization variables

When you use SQL ELT optimization, the Secure Agent converts the expression in the transformation by determining equivalent variables in the database. If there is no equivalent variable in the database, the Secure Agent processes the transformation logic.
The following table summarizes the availability of SQL ELT optimization variables in Microsoft SQL Server:
Variables
SQL ELT optimization Type
SESSSTARTTIME
Full
SYSDATE
Full

Configuring SQL ELT optimization

To optimize a mapping, add the mapping to a task, and then configure SQL ELT optimization in the mapping task. Full SQL ELT optimization is enabled by default in mapping tasks.
    1In the Runtime Options tab of the Mapping task, navigate to the SQL ELT Optimization section.
    2From the SQL ELT Optimization list, select the required type of SQL ELT optimization.

Rules and guidelines for SQL ELT optimization

Consider the following rules and guidelines when you configure SQL ELT optimization for a Microsoft SQL Server mapping:
Consider the following rules and guidelines when you configure full SQL ELT optimization for a Microsoft SQL Server mapping:
Consider the following rules and guidelines when you use an Expression transformation in a Microsoft SQL Server mapping enabled with full SQL ELT optimization: