question

Aparna-1 avatar image
Aparna-1 asked

SELECTS Inside a transaction -

Hello SSC Members,

We have a stored procedure template that embeds SELECTS in a transaction. I understand that there is nothing to commit or rollback and therefore it is an unnecessary overhead. But the question is will it cause any performance issues? - additional locking/blocking of the database?. Assume that the select was not in a transaction and the database is READ COMMITTED the select irrespective of whether it is in transaction or not will acquire READ/Shared lock and Insert/update/delete queries will have to wait for the shared lock to be released. But what is the downside from an overall database point of view to have every select in transactions?

performanceselecttransactionlocking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.