Professional Documents
Culture Documents
INFORMATICA
BY
A N U PA M A R A J
- BC M D
1
INDEX
1.INTRODUCTION............................................................................................................3
1.1.Datawarehousing........................................................................................................3
1.2.Informatica as a datawarehousing tool .....................................................................3
1.3.Need for Performance Tuning ...................................................................................3
2.IDENTIFICATION OF BOTTLENECKS.......................................................................4
2.1Identify bottleneck in Source......................................................................................4
2.2Identify bottleneck in Target.......................................................................................4
2.3Identify bottleneck in Transformation........................................................................4
2.4Identify bottleneck in sessions ...................................................................................4
3.PERFORMANCE TUNING OF SOURCES....................................................................5
4.PERFORMANCE TUNING OF TARGETS....................................................................5
5.PERFORMANCE TUNING OF LOOKUP TRANSFORMATIONS..............................6
6.PERFORMANCE TUNING OF OTHER TRANSFORMATIONS.................................7
6.1.Update Strategy Transformation................................................................................7
6.2.Sequence generator Transformation..........................................................................7
6.3.Sorter Transformation................................................................................................8
6.4.Aggregator Transformation........................................................................................8
6.5.Joiner Transformation................................................................................................8
6.6.Filter Transformation.................................................................................................9
6.7.Expression Transformation........................................................................................9
7.PERFORMANCE TUNING OF MAPPINGS.................................................................9
8.PERFORMANCE TUNING OF SESSIONS.................................................................10
9.DATABASE OPTIMISATION.......................................................................................11
10. OPTIMUM CACHE SIZE IN LOOKUPS..................................................................11
2
1. INTRODUCTION
1.1. Datawarehousing
Performance is not just one job loading maximum data in a particular time
frame. Performance can be more accurately defined as a combination of several
small jobs which affect the over all performance of a system.
Informatica is an ETL tool with high performance capability. We need to
make maximum utilization of its features to increase its performance. With the
ever increasing user requirements and exploding data volumes, we need to
achieve more in less time. The goal of performance tuning is optimize session
performance. This document lists all the techniques available to tune Informatica
performance.
3
2. IDENTIFICATION OF BOTTLENECKS
Performance of Informatica is dependant on the performance of its several
components like database, network, transformations, mappings, sessions etc. To
tune the performance of Informatica, we have to identify the bottleneck first.
Bottleneck may be present in source, target, transformations, mapping, session,
database or network. It is best to identify performance issue in components in the
order source, target, transformations, mapping and session. After identifying the
bottleneck, apply the tuning mechanisms in whichever way they are applicable to
the project.
If source is a relational table, put a filter transformation in the mapping, just after
source qualifier; make the condition of filter to FALSE. So all records will be
filtered off and none will proceed to other parts of the mapping.
In original case, without the test filter, total time taken is as follows:-
Total Time = time taken by (source + transformations + target load)
Now because of filter, Total Time = time taken by source
So if source was fine, then in the latter case, session should take less time. Still if
the session takes near equal time as former case, then there is a source bottleneck.
4
MASTER> PETL_24019 Thread [TRANSF_1_1_1_1] created for the transformation
stage of partition point [SQ_test_all_text_data] has completed: Total Run
Time = [11.764368] secs, Total Idle Time = [0.000000] secs, Busy Percentage
= [100.000000].
If busy percentage is 100, then that part is the bottleneck.
More information on source and target table tuning can be read from the section
‘Performance tuning of Mappings’ and ‘Performance tuning of sessions’.
5
5. PERFORMANCE TUNING OF LOOKUP
TRANSFORMATIONS
Lookup transformations are used to lookup a set of values in another table.
Lookups slows down the performance.
1. To improve performance, cache the lookup tables. Informatica can cache all the
lookup and reference tables; this makes operations run very fast. (Meaning of
cache is given in point 2 of this section and the procedure for determining the
optimum cache size is given at the end of this document.)
2. Even after caching, the performance can be further improved by minimizing the
size of the lookup cache. Reduce the number of cached rows by using a sql
override with a restriction.
Cache: Cache stores data in memory so that Informatica does not have to read
the table each time it is referenced. This reduces the time taken by the process to a
large extent. Cache is automatically generated by Informatica depending on the
marked lookup ports or by a user defined sql query.
Example for caching by a user defined query: -
Suppose we need to lookup records where employee_id=eno.
‘employee_id’ is from the lookup table, EMPLOYEE_TABLE and ‘eno’ is the
input that comes from the from the source table, SUPPORT_TABLE.
We put the following sql query override in Lookup Transform
‘select employee_id from EMPLOYEE_TABLE’
If there are 50,000 employee_id, then size of the lookup cache will be 50,000.
Instead of the above query, we put the following:-
‘select emp employee_id from EMPLOYEE_TABLE e, SUPPORT_TABLE s
where e. employee_id=s.eno’
If there are 1000 eno, then the size of the lookup cache will be only 1000.
But here the performance gain will happen only if the number of records in
SUPPORT_TABLE is not huge. Our concern is to make the size of the cache as
less as possible.
3. In lookup tables, delete all unused columns and keep only the fields that are used
in the mapping.
4. If possible, replace lookups by joiner transformation or single source qualifier.
Joiner transformation takes more time than source qualifier transformation.
5. If lookup transformation specifies several conditions, then place conditions that
use equality operator ‘=’ first in the conditions that appear in the conditions tab.
6. In the sql override query of the lookup table, there will be an ORDER BY clause.
Remove it if not needed or put fewer column names in the ORDER BY list.
7. Do not use caching in the following cases: -
-Source is small and lookup table is large.
-If lookup is done on the primary key of the lookup table.
8. Cache the lookup table columns definitely in the following case: -
-If lookup table is small and source is large.
9. If lookup data is static, use persistent cache. Persistent caches help to save and
reuse cache files. If several sessions in the same job use the same lookup table,
6
then using persistent cache will help the sessions to reuse cache files. In case of
static lookups, cache files will be built from memory cache instead of from the
database, which will improve the performance.
10. If source is huge and lookup table is also huge, then also use persistent cache.
11. If target table is the lookup table, then use dynamic cache. The Informatica server
updates the lookup cache as it passes rows to the target.
12. Use only the lookups you want in the mapping. Too many lookups inside a
mapping will slow down the session.
13. If lookup table has a lot of data, then it will take too long to cache or fit in
memory. So move those fields to source qualifier and then join with the main
table.
14. If there are several lookups with the same data set, then share the caches.
15. If we are going to return only 1 row, then use unconnected lookup.
16. All data are read into cache in the order the fields are listed in lookup ports. If we
have an index that is even partially in this order, the loading of these lookups can
be speeded up.
17. If the table that we use for look up has an index (or if we have privilege to add
index to the table in the database, do so), then the performance would increase
both for cached and uncached lookups.
7
3. We can also opt for sequencing in the source qualifier by adding a dummy field in
the source definition and source qualifier, and then giving a sql query like
‘select seq_name.nextval, <other column names>... from <source table name>
where <condition if any>’.
Seq_name is the sequence that generates primary key for our source table.
<Sequence name>. Nextval is a sequence generator object in Oracle.
This method of primary key generation is faster than using sequence generator
transformation.
1. Aggregator, rank and joiner transformation will decrease performance since they
group data before processing. So to improve performance here, use sorted ports.
2. In aggregator transformation, in the GROUP BY clause, use numbers instead of
strings if possible.
3. Avoid complex expressions in aggregator conditions.
4. Limit the number of connected input or output ports. This reduces the cache size.
8
6.6. Filter Transformation
9
names in that list. For better performance it is best to order by the index field of
that table.
9. Combine the mappings that use same set of source data.
10. On a mapping, field with the same information should be given the same type and
length throughout the mapping. Otherwise time will be spent on field conversions.
11. Instead of doing complex calculation in query, use an expression transformer and
do the calculation in the mapping.
12. If data is passing through multiple staging areas, removing the staging area will
increase performance.
13. Stored procedures reduce performance. Try to keep the stored procedures simple
in the mappings.
14. Unnecessary data type conversions should be avoided since the data type
conversions impact performance.
15. Transformation errors result in performance degradation. Try running the
mapping after removing all transformations. If it is taking significantly less time
than with the transformations, then we have to fine-tune the transformation.
16. Keep database interactions as less as possible.
1. Partition the session: This creates many connections to the source and target, and
loads data in parallel pipelines. Each pipeline will be independent of the other.
But the performance of the session will not improve if the number of records is
less. Also the performance will not improve if it does updates and deletes. So
session partitioning should be used only if the volume of data is huge and the job
is mainly insertion of data.
2. Run the sessions in parallel rather than serial to gain time, if they are independent
of each other.
3. Drop constraints and indexes before we run session. Rebuild them after the
session run completes. Dropping can be done in pre session script and Rebuilding
in post session script. But if data is too much, dropping indexes and then
rebuilding them etc. will be not possible. In such cases, stage all data, pre-create
the index, use a transportable table space and then load into database.
4. Use bulk loading, external loading etc. Bulk loading can be used only if the table
does not have an index.
5. In a session we have options to ‘Treat rows as ‘Data Driven, Insert, Update and
Delete’. If update strategies are used, then we have to keep it as ‘Data Driven’.
But when the session does only insertion of rows into target table, it has to be kept
as ‘Insert’ to improve performance.
10
6. Increase the database commit level (The point at which the Informatica server is
set to commit data to the target table. For e.g. commit level can be set at
every every 50,000 records)
7. By avoiding built in functions as much as possible, we can improve the
performance. E.g. For concatenation, the operator ‘||’ is faster than the function
CONCAT (). So use operators instead of functions, where possible. The functions
like IS_SPACES (), IS_NUMBER (), IFF (), DECODE () etc. reduce the
performance to a big extent in this order. Preference should be in the opposite
order.
8. String functions like substring, ltrim, and rtrim reduce the performance. In the
sources, use delimited strings in case the source flat files or use varchar data type.
9. Manipulating high precision data types will slow down Informatica server. So
disable ‘high precision’.
10. Localize all source and target tables, stored procedures, views, sequences etc. Try
not to connect across synonyms. Synonyms and aliases slow down the
performance.
9. DATABASE OPTIMISATION
To gain the best Informatica performance, the database tables, stored
procedures and queries used in Informatica should be tuned well.
1. If the source and target are flat files, then they should be present in the system in
which the Informatica server is present.
2. Increase the network packet size.
3. The performance of the Informatica server is related to network connections.
Data generally moves across a network at less than 1 MB per second, whereas a
local disk moves data five to twenty times faster. Thus network connections often
affect on session performance. So avoid network connections.
4. Optimize target databases.
The lookup index cache holds data for the columns used in the lookup condition.
For best session performance, specify the maximum lookup index cache size. Use
the following information to calculate the minimum and maximum lookup index
cache for both connected and unconnected Lookup transformations: -
11
To calculate the minimum lookup index cache size, use the formula:-
Columns in lookup cache = 200 * [<Column size> + 16]
To calculate the maximum lookup index cache size, use the formula:-
Columns in lookup cache = <Number of rows in lookup table>* [<column
size> + 16] * 2
Example:-
Suppose the lookup table has lookup values based in the field ITEM_ID. It uses
the lookup condition, ITEM_ID = IN_ITEM_ID1.
This ITEM_ID has data type as ‘integer’ and size as ‘16’.
Therefore the total column size is 16. The table contains 60000 rows.
Minimum lookup index cache size = 200 * [16 + 16] = 6400
Maximum lookup index cache size = 60000 * [16+16] * 2 = 3,840,000
So this lookup transformation needs an index cache size between 6400 and
3,840,000.
For best session performance, this lookup transformation needs an index cache
size of 3,840,000 bytes.
To calculate the minimum lookup data cache size, use the formula:-
Columns in lookup cache = <Number of rows in lookup table> * [<Column
size of connected output ports not in lookup condition > + 8]
Example:-
Suppose the lookup table has column names as PROMOTION_ID and
DISCOUNT which are connected output ports not in lookup condition
Column size of each is 16. Therefore total column size is 32.The table contains
60000 rows.
Minimum lookup data cache size = 60000 * [32 + 8] = 2,400,000
So this lookup transformation needs a data cache size of 2, 40,000 bytes.
*********************
12