Skip to Main Content

How do i improve the performance of my Insert statements

891071Sep 8 2013 — edited Sep 9 2013

Hi All ,

   I have a problem in which i have one staging table where external party populates the data .  My work is to copy these values into my internal tables.

I have 7 internal tables to be populated from this one table. This external party populated table can have duplicate rows , I need to do unique insert which i am doing currently .

My sample code :

  

Insert into table Internal1 ( a , b,c,d ) select unique a,'hello',c, d from external;

Insert into table internal2( g,k,p,i) select unique a,b,somecolumn, d from external ;

The external table contains a very large amount of data and i feel bad about the code when it hits DB 7 times for 7 inserts.

Can someone suggest a better idea ?

Thanks in advance .

B1

Comments
Post Details
Added on Sep 8 2013
4 comments
175 views