Skip navigation
23342 Views 4 Replies Latest reply: Sep 14, 2010 10:34 PM by teresap989 RSS
kaucic New Enzee 14 posts since
May 27, 2009
Currently Being Moderated

Mar 2, 2010 8:20 AM

slow insert in stored procedure

Hi,

 

i have table t1(with n columns) and t2 (with n+1 columns) and t3(PK_T1, GEN_KEY) .

 

for loop read data from t1

  if PK_T1 in T3

     take GEN_KEY from T3

  else

    next val from seque -> GEN_KEY.

  end if 

 

  write GEN_KEY + all data from T1 to T2

end loop

 

This is very slow 9mins form 1000 record.

 

What did a do wrong ????

 

thanks, bye

d

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points