Escolar Documentos
Profissional Documentos
Cultura Documentos
6
Pushdown Optimization
Agenda
Pushdown Optimization Overview Running Pushdown Optimization
Running Source-Side Pushdown Optimization Running Target-Side Pushdown Optimization Running Full Pushdown Optimization
25 May 2012
Agenda
Working With Transformations
Aggregator transformation Expression Transformation Filter Transformation Joiner Transformation Lookup Transformation Sorter Transformation Union Transformation Source Qualifier transformation Target
25 May 2012
Agenda
Working With SQL Overrides
Views Troubleshooting Orphaned Views Rules and Guidelines
Using the $$PushdownConfig Mapping Parameter Viewing Pushdown Groups Rules and Guidelines
25 May 2012
25 May 2012
Pushes the transformation logic to the source or target database The Integration Service analyzes the mapping and writes one or more SQL statements based on the mapping transformation logic, mapping, session and pushdown configuration
25 May 2012 6
25 May 2012
For SQL or Lookup override views are generated. Select statement runs against the view
Integration Service generates SELECT statement based on the transformation logic for each transformation it can push to the database
The Integration Service analyzes the mapping from the source to the target or until it reaches a downstream transformation it cannot push to the database
25 May 2012 8
Processes transformation logic up to the point that it can push the transformation logic to the target database
The Integration Service analyzes the mapping from the target to the source or until it reaches an upstream transformation it cannot push to the database
Integration Service generates INSERT, DELETE, or UPDATE statement based on the transformation logic
25 May 2012
INSERT SELECT statement that is run on the database Incorporating the whole of transformation logic
When a session runs for full pushdown optimization, the database must run a long transaction if the session contains a large quantity of data
25 May 2012
10
25 May 2012
25 May 2012
25 May 2012
25 May 2012
Oracle treats null values as the highest value in the sort order
Returned results therefore will differ as null values are treated differently
25 May 2012
Sort Order in Microsoft SQL Server database is not case sensitive Returned results therefore will differ as sort orders are different.
25 May 2012
Database which are not case sensitive will return rows that match the values Ca, ca, cA, and CA
25 May 2012
25 May 2012
The ROUND function on a date, stores the date value in a character column, using the format MM/DD/YYYY HH:MI:SS.US Oracle stores the date value using default format as DD-MON-YY
25 May 2012
Therefore the results will differ as database uses a different precision than the Integration Service
25 May 2012
The current date and time for the node running the service process is returned
On Pushdown optimization, the SYSDATE variable returns the current date and time for the machine hosting the database HH:MI:SS.US
If the time zone of the machine hosting the database is not same as the time zone of the machine running the Integration Service process, the results can vary
25 May 2012
In some cases, ANSI SQL is not compatible with the syntax required for a particular database
Different databases encounters different types of problems
25 May 2012
25 May 2012
25 May 2012
25 May 2012
25 May 2012
25 May 2012
Operator
Oracle
IBM DB2
Teradata
Sybase ASE X X
ODBC
X X
X X
X X
X X
X X X X X
X X X Source X
X X X Source X
X X X Source X
X X X Source X
X X X -
25 May 2012
Variable
Oracle
IBM DB2
X X -
Teradata
SybaseASE
ODBC
X X -
X X -
X X -
X -
25 May 2012
X
S
X
X
X
S
X
X
X
Cannot push transformation logic to a Teradata database for a transformation that uses an expression containing ADD_TO_DATE to change days, hours, minutes, or seconds.
X X X X
X X X X
X X X X
X S
25 May 2012
Function
Sybase ASE
Teradata
ODBC
COMPRESS() CONCAT() COS() COST() COSH() COUNT() CRC32() CUME() DATE_COMPARE() DATE_DIFF() DECODE()
X S X X X X X X S X X
X S X X S X X X S X X
X X X X X X X X S X X
X S X X S X X X S X X
X S X X X X X S S X
X X X X X S X
25 May 2012
Function DECODE_BASE64() DECOMPRESS() ENCODE_BASE64() ERROR() EXP() FIRST() FLOOR() FV() GET_DATE_PART() GREATEST() IIF() IN() INDEXOF() INITCAP() INSTR() IS_DATE()
IBM DB2 X S X X X X X X X X X S
Oracle X X X X X X X X X
Sybase ASE X S X X X X X X X
Teradata X S X X X S X X X
ODBC X X X X
X X
25 May 2012
X Oracle returns the date up to the second. If the input date contains subseconds, Oracle trims the date to the second
X X X X X X
X X
X X
X X
X X
If LTRIM in transformation logic, is used the database treats the argument (' ') as NULL, but the Integration Service treats the argument (' ') as spaces
LOG()
S
25 May 2012
Note: For details on remaining functions refer to the Workflow Administration Guide
25 May 2012
25 May 2012
Transformation
Target-Side
Aggregator
X X X X -
X X 25 May 2012
Target-Side -
SQL
Stored Procedure Target Transaction Control Union Update Strategy XML Generator XML Parser XML Source Qualifier
X X -
25 May 2012
Transformation logic for the first Aggregator is pushed to the database, and the Integration Service processes the second Aggregator transformation
SQ_TARGET_I TEMS_ORDER 1
SOR_OrderID
AGG_OrderID
AGG_ITEMID
25 May 2012
38
Any one of the aggregate functions FIRST(), LAST(), MEDIAN(), or PERCENTILE() is used
25 May 2012
ORDERS (Oracl e)
SQ_ORDERS
EXP_Transform Data
All the valid databases for the pushdown optimization can use all three types of Pushdown Optimization when Expression Transformation is used
ITEMS (Oracle)
SQ_ITEMS
FIL_DisContFlag
ORDER_ITEMS (Oracle)
SQ_ORDER_IT EMS
JOIN_items
All the valid databases for the pushdown optimization can use all Source Side and Full Pushdown Optimization Type when Filter Transformation is used
25 May 2012
SQL cannot be generated to represent an outer join combined with a multi-table join that joins greater than two tables
The Joiner is configured for a full outer join and attempt to push transformation logic to a Sybase database
25 May 2012
25 May 2012
Only one branch of the pipeline is processed when Lookup transformation exists in two branches of a pipeline that are joined by a Joiner or Union transformation
When session requires data type conversion target-side pushdown optimization fails
Target-side pushdown optimization fails when lookup table connected to ODBC Connection or Sybase or Microsoft SQL Server database
25 May 2012
25 May 2012
On distinct sort, the Integration Service pushes the Sorter transformation to the database and processes downstream transformations
When a Sorter transformation is downstream from a Union transformation, the sort key on the Union transformation must be a connected port.
25 May 2012
25 May 2012
25 May 2012
25 May 2012
25 May 2012
If a transformation uses pass-through partitioning, the Integration Service can push transformation logic to the source or target database, or both.
If a transformation uses a key range partition in the Source Qualifier transformation and hash auto-keys partitioning in downstream partition points, the Integration Service can push transformation logic to the source database by merging all rows into the first partition. To merge all rows into the first partition, the end key range for each partition must equal the start range for the next partition, and it cannot overlap with the next partition.
25 May 2012
The first key range is 1313 3340, and the second key range is 3340 - 9354
The SQL statement selects items 1313 through 9354, which includes all values in the key range and merges the data from both partitions into the first partition
The SQL statement for the second partition passes empty data
25 May 2012
Source-Side Optimization
X X X X
Target-Side Optimization
X X X X
Full Optimization
X* X** X*
X* = If source rows as datadriven are treated, the Integration Service cannot perform full pushdown optimization. It can push transformation logic upstream or downstream from the Update Strategy or Custom transformation
X** =Although full pushdown optimization can be used when source rows as delete are treated, performance gains might not be achieved. If not, use partial pushdown optimization. Also, full pushdown optimization cannot be used and treat source rows as delete if the session includes a Union transformation and the Integration Service pushes transformation logic to a Sybase database0
25 May 2012
25 May 2012
The session log does not contain details for transformations processed on the database.
The Integration Service does not write the thread busy percentage to the log for a session configured for full pushdown optimization. The Integration Service writes the number of loaded rows to the log for source-side, targetside, and full pushdown optimization. When the Integration Service pushes all transformation logic to the database, the Integration Service does not write the number of rows read from the source to the log.
When the Integration Service pushes transformation logic to the source, the Integration Service writes the number of rows read for each source to the log. However, the number may differ from statistics for the same session run by the Integration Service.
25 May 2012
25 May 2012
25 May 2012
25 May 2012
Creates a view: The Integration Service generates the view by incorporating the SQL override query in a view definition. The Integration Service does not parse or validate the SQL override, so the SQL override should be tested before running the session.
Runs an SQL query against the view: After the Integration Service generates a view, the Integration Service runs an SQL query to push the transformation logic to the source. It runs this query against the view created in the database. Drops the view: When the transaction completes, the Integration Service drops the view it created to run the SQL override query.
25 May 2012
After the view is created, the Integration Service runs an SQL query to perform the transformation logic in the mapping
SQL override which return customers information whose names match variations of the name Johnson, including names such as Johnsen, Jonssen and Jonson
The Integration Service pushes transformation logic for this session to the database, it runs the SQL statement to create a view in the source database
To create a unique view name, the Integration Service appends PM_V to a value generated by a hash function
25 May 2012
Complete the following steps to remove extra views from the database:
View the session log: While running the session, the Integration Service writes an event log when it creates the view, and it also writes an event log when it drops the view. If an Integration Service, session, or connection fails when running a session, check the session log to see if Integration Service dropped the view. Run a query: If the Integration Service did not drop views, run a query to locate all views created by the Integration Service. Views created by the Integration Service use the same prefix. Drop the view: After locating the views created by the Integration Service, run an SQL statement to manually drop the views from the database.
25 May 2012
25 May 2012
If the Source Qualifier contains multiple partitions, specify the SQL override for all partitions.
If a Source Qualifier transformation contains Informatica outer join syntax in the SQL override, the Integration Service processes the Source Qualifier transformation logic. PowerCenter does not validate the override SQL syntax, so test the SQL override query before it is pushed to database. When SQL override is created, ensure that the SQL syntax is compatible with the source database.
25 May 2012
25 May 2012
25 May 2012
Datatype
Precision or Scale Aggregation Initial Value Description
String
10 n/a None Optional
When the session is configured, choose $$PushdownConfig for the Pushdown Optimization attribute`
25 May 2012
25 May 2012
25 May 2012
The messages in the Viewer can be used to determine how to edit transformations or mappings to push more transformation logic to the database
The Pushdown Optimization Viewer cannot display the SQL that runs in the session if variables is used or if the session is configured to run on a grid.
25 May 2012
Pipeline1
Pipeline2
Pushdown Group 1
Pushdown Group 2
25 May 2012
The pushdown option in the viewer does not affect the optimization that occurs at run time. To change pushdown optimization for a session, edit the session properties
25 May 2012
25 May 2012
Select to configure pushdown optimization. Select one of these None, To Source, To Source with View, To Target, Full, Full with View, $$PushdownConfig
25 May 2012
25 May 2012
73
25 May 2012
74