-2

I'm testing the speed of BCP utility. I'm using the same database, table, data file (10 million lines), format file etc. in different experiments. After each experiment, I drop table and create the new one (exactly the same). When BCP utility doesn't work my HDD performance loaded on 1-5% (I use Task Manager to check it). When it works HDD loaded on 99%.

BUT.

I had 6 experiments now. The best is 178 sec the worst is 292 sec!!!

I will need to compare BCP to other methods, figure out what influences on speed (for example indexes, constraints, recovery settings etc) and how big is this influence. But I can't do it now because of such big differences between same experiments.

Why it happens and can I fix it?

UPD: I changed recovery model to "full" from "simple" and made more experiments. Now the best time is 173 sec the worst is 435 sec :)

zer_ik
  • 410
  • 1
  • 4
  • 14

1 Answers1

0

Maybe you need to test Nonlogged BULK INSERT

  1. Recovery mode set to SELECT INTO/BULK INSERT
  2. Add TABLOCK
BULK INSERT TestDB
FROM 'C:\TestDB.txt'
WITH
(
    FIELDTERMINATOR = '\t',
    ROWTERMINATOR = '\n',
    TABLOCK
)