Truncate table then insert rows and Clear table then insert

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Truncate table then insert rows and Clear table then insert

Post by dodda »

Hi All,

Can anyone provide some information about Truncate table then insert rows and Clear table then insert rows in oracle stage.

And kindly let me know will give better performance if the target table has more number of rows.

I appreciate your help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Truncate issues a TRUNCATE TABLE statement, which is non-transactional. Clear (probably) issues a DELETE command, which will be logged in the transaction log. As a general rule truncate is faster.
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 »

ray.wurlod wrote:Clear (probably) issues a DELETE command, which will be logged in the transaction log.
Right, it does.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Thanks for the information..
Post Reply