M
M
Michael2016-04-09 21:14:54
MySQL
Michael, 2016-04-09 21:14:54

Are there any downsides to transactions?

Are there any downsides to using transactions in databases?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Entelis, 2016-04-09
@Sing303

Directly from the introduction of transactions, nothing starts to work more slowly.
The slowdown can be from two things:
a) if transactions are used thoughtlessly, for example, the transaction is not completed at the moment when it should be completed according to the business logic - accordingly, the records are blocked for an extra time, another thread cannot change them.
b) if strict settings for saving to disk are set
Michael : because writing to disk is an expensive procedure. But in general, the need for this depends on the business logic of the application itself and the required consistency.
It's one thing if you have financial data in a transaction, it's another thing if you make a conditional chat.

D
DarkMatter, 2016-04-09
@darkmatter

Real transactions must be immediately flushed to disk, for example, innodb performance drops by about 100-200 times with this setting

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question