0

I’m using Entity Framework and Sql Server 2012. I have to remove in one Transaction a lot of items from database about 200 GB. I’m deleting the data now directly this is very fast!

The problem if the deleting process is failed the database will be defected that why I’m thinking to use Transactionscope. When the process failed I will Rollback the database.

Is Transactionscope good to handle a lot of data or we have to make some consideration about the performance. Anyone have some benchmark data or experience with this problem?

Any help would be greatly appreciated

Bassam Alugili
  • 16,345
  • 7
  • 52
  • 70
  • We don't have a 200 GB database floating around, we don't have your schema, we don't know what to remove, we don't own your hardware. **You** benchmark it. Yes, there's an overhead to transactions, whether that's affordable in your case entirely depends on your case. – CodeCaster Oct 15 '13 at 08:10
  • 1
    A bit of light on your issue [here](http://stackoverflow.com/questions/1155941/transactionscope-has-it-gotten-better), but as @CodeCaster says, you have the burden to test it – Steve Oct 15 '13 at 08:15
  • @CodeCaster thanks for comments. You have talked about overhead? have any helpfull link or general information about Transcationscope and pefromance? I just find some info in msdn social but not worthfull I will do the benchmark by my self thanks! – Bassam Alugili Oct 15 '13 at 08:15
  • @Steve very good thanks David glass wrote a very usefull info about this problem! This make me feeling better to solve this problem with TranscatioScope. – Bassam Alugili Oct 15 '13 at 08:19

1 Answers1

1

As they have said in the comments it has some impact but it is trivial if you decompile TransactionScope class and look to the code you will see what it happening there!

It is really depending on your Database settings/Schema; you can optimize your database to get the best results. This approach have been used for years and I have used for long time until now I have no problem with it.