Efficient way of Committing transactions

If I have 10 statements, individually committing each statement is efficient or doing a bulk commit of all the 10 statements at the end is efficient.

Also if we say one of them is efficient... is it efficient in space or time or cpu?

Thanks,
rbala_sjsu

Questions by rbala_sjsu

Showing Answers 1 - 1 of 1 Answers

There is a trade-off in this case. In case of transaction-oriented scenario, I think executing 10 statements separately would be a better option since it will hold the lock for a very short duration allowing other processes to access the resource. But in case of a database with mainly static data, I would go for the other option i.e. to batch-execute all the statements as a single atomic transaction

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions