Skip to Content
0
Former Member
May 14, 2014 at 05:34 PM

How to improve performance to insert large amount of data to a table?

1929 Views

There is a table mytab with primary(3 columns) and one index on one column,

A sp is created with a cursor to insert data to this table in following steps:

truncate data in mytab

insert data into mytab one row by one row with a cursor.

When sp done, the data and index in mytable would be 3G.

It is very slow. almost one minute only insert about 1000 rows in mytab.

If not change the code of SP, how to improve performance for this case?

Before insert data, if drop the index could improve performance?