I have a database that contains data for many “clients”. Currently, we insert tens of thousands of rows into multiple tables every so often using .Net SqlBulkCopy which causes the entire tables to be locked and inaccessible for the duration of the transaction.
As most of our business processes rely upon accessing data for only one client at a time, we would like to be able to load data for one client, while updating data for another client.
To make things more fun, all PKs, FKs and clustered indexes are on GUID columns (I am looking at changing this).
I’m looking at adding the ClientID into all tables, then partitioning on this. Would this give me the functionality I require?
I haven’t used the built-in partitioning functionality of SQL Server, but it’s something I am particularly interested in. My understanding is that this would solve your problem.
From this article
And a great whitepaper on partitioning by Kimberly L Tripp is here. Well worth a read – I won’t even try to paraphrase it – covers it all in a lot of detail.
Hope this helps.