I’m importing a huge amount of data using BCP, and I was curious about what options it has to improve the speed of this operation.
I read about parallel loading in a couple of places, and also saw that you can tell it to not bother to sort the data or check constraints (which are all viable options for me since the source is another database with good integrity).
I haven’t seen examples of these options being used though (as in, I don’t know what command line switch enables parallel loading or contraint checking disabling).
Does anyone know a good resource for learning this, or can someone give me a couple trivial examples? And please don’t point me to the BCP parameters help page, I couldn’t make heads or tails of it with regard to these specific options.
Any help is greatly appreciated!
You need to read The Data Loading Performance Guide. There is no magical command line switch ‘load faster’, is a very complicated balance of doing the right thing in the right context. It depends on whether you load a heap or a B-Tree, whether there is already data or the table is empty, whether it has secondary indexes, whether minimally logging is possible in the database recovery model, whether the table is partitioned or not, whether the data is pre-sorted or not and that is just the surface. The linked white paper has all the details.