One Star

How to drop index before job and regenerate them after

Hi everyone,
I'd lke to know if there was an easy way in talend to drop indexes on tables (I use mysql) in talend 2.0.2 java first in a job and then at the end to generate them again. It's obvious that for big jobs includind LOTS and LOTS of inserts/update, there is a performance boost at doing this, but I see no easy way of doing it!
Thx for your help!
3 REPLIES
One Star

Re: How to drop index before job and regenerate them after

Hi,
1. Drop indexes with a tMysqlRow component linked to the tMysqlInput with the Trigger
2. Create indexes with a tMysqlRow component after the insert with the Trigger
tMysqlRow --> --> tMysqlInput --> --> tMysqlOutput --> --> tMysqlRow
Hope this help.
One Star

Re: How to drop index before job and regenerate them after

Hi,
I need to drop index and truncate table before inserting into table. Can any one please explain how to do this kind of jobs
My jobs is tOrcleInput-->tmap-->tOracleOutput
how to change my job to drop index
Five Stars

Re: How to drop index before job and regenerate them after

Take a look at "Action on table" of tOracleOutput. If one of these does not work for you, then it is the same answer as previously posted for MySQL.