August 30, 2004 at 8:29 am
August 31, 2004 at 12:32 am
Ordered Data Files:
Using ROWS_PER_BATCH:
Controlling the Locking Behavior:
Search for all these topic from BOL.
Question 1: While doing a BCP,foreign key constraint will not be checked by default. If this is the case you cannot ensure you BCPing the data with integrity.
Check BOL for opting -h for BCP utility.
Removing index and rebuilding the index will improve the performance dramatically. You can do that using a procedure. Just call the procedure before BCP,Run the BCP, again call the procedure to re-build the index.
Question 2:
Not a wise idea. Because BCP is the fastest way to upload data because as it uses the SQL Server ODBC driver bulk copy functions.
Apart from that you can use the following hints TABLOCK,ROWS_PER_BATCH.
Thanks,
Ganesh
August 31, 2004 at 9:27 am
4 million rows doesn't sound like a lot, but did you consider partitioning the data by client? Then you could BCP concurrently and each transaction is still isolated.
September 2, 2004 at 10:04 pm
You probably wont get much faster overall (I mean the time the last users' data is completed) without dropping indexes or constraints, but you say the data must remain available. If you want to juggle things so the users feel better, thats different. For example, you could load into one table per user, and have a background process that imports new data into the main table. Of course that delays the actual update.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply