clean database

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
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

clean database

Post by rafidwh »

I need to clean database for repeated testing the data,
I used two oci stage and a transformer and in the target oci i gave the update action as "clear the table and insert",when I tried to run the job,it shows in the director that it is running,but in the Datastage job the if we check the performance statistics it shows 0 rows populating nad the job still continue to run without deleting the records,

Best suggestions please.I know it is very silly ,but I need your utmost suggestions
Thanks in advance
kcshankar
Charter Member
Charter Member
Posts: 91
Joined: Mon Jan 10, 2005 2:06 am

Post by kcshankar »

Hi,
Clear Table then insert rows options will be slower because of transaction logging.Try Truncate table then insert rows options.


regards
kcs
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I believe that "clear table" implies "DELETE FROM table;" which can be hugely slow if there are lots of referential integrity constraints. If these are made into a single transaction nothing at all will appear to occur until the COMMIT is transmitted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'd also be curious if your design is to 'clean' a single table? In other words, are you sourcing from the same table you are clearing? :?

I know it sounds silly, but I've seen people try to do that - they will only write back 'the records they want to keep' - hence the question. And if that is the case, suggest you break the job up into two jobs - one that lands the 'clean' data you want to keep to a flat file and a second that truncates/clears the table and then reloads it from the file.

And yes - 'clear' is a transactional 'delete all records' and as such it could take quite some time before anything appears to happen in the monitor.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply