bulk loading

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
harish_s_ampeo
Participant
Posts: 26
Joined: Tue Dec 18, 2007 6:31 am

bulk loading

Post by harish_s_ampeo »

Which bulk loading is better in performance
1. Oracle 7 Load
2. Oracle OCI Load

I have to every time delete the table and insert the records. In #2 we don't have the option to delete the table in oracle.
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Post by tkbharani »

Your question is not clear is it DELETE or TRUNCATE. if delete then are you using any key for deletion. If deletion then I suppose you can not do it through BULK loading.
If TRUNCATE/LOAD then use ORACLE 7 BULK LOAD to create Control file and load using sql loader(sqlldr). In CTL you can specify TRUNCATE or REPLACE OR APPEND OR INSERT only. This is faster for TRUNCATE/LOAD

Please correct me if I am wrong.
Thanks, BK
harish_s_ampeo
Participant
Posts: 26
Joined: Tue Dec 18, 2007 6:31 am

Post by harish_s_ampeo »

The strategy is DELETE. I have to daily delete the previous day's records and insert the records(bulk loading) into the table
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And in your case, the "previous day's records" = everything in the table? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And in your case, the "previous day's records" = everything in the table? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Post by tkbharani »

Ok.On your way..
You want to delete all the records in the table , or only the records that have been loaded yesterday.
If only the records loaded yesterday
------------------------------------
1. Use DATE parameter as key and use ORACLE OCI stage only (not bulk)
2. Write user defined sql.
3. Delete * from table where
Record_Date >= Date1 and Record_Date < Date2
4. Provided your table contains Record_Date(date on which the data is loaded).

I have given both the solution(Delete full table or only selected data). Since I don't know the data format,i am writing user defined sql. In case of full table delete , use TRUNCATE.Delete will be slow and uses more system resources on data base side.
Thanks, BK
Post Reply