What is the impact of mysql transactions on efficiency
This article mainly explains "what is the impact of mysql transactions on efficiency". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the impact of mysql transactions on efficiency".
1. Database transactions will degrade the performance of the database. In order to ensure the consistency and isolation of data, transactions need to lock transactions.
2. If other transactions need to manipulate this part of the data, you must wait for the end of the last transaction (commit, rollback).
Example
Create table acct (acct_no varchar (32), acct_name varchar (32), balance decimal (16Magne2)); insert into acct values ('0001th where acct_no, 1000), (2000); start transaction;-- start transaction update acct set balance = balance-100 where acct_no =' 0001;-- simulated withholding update acct set balance = balance + 100 where acct_no = '0002;-- simulated payee commit -- transaction commit rollback;-- transaction rollback Thank you for your reading. The above is the content of "what is the impact of mysql transactions on efficiency". After the study of this article, I believe you have a deeper understanding of the impact of mysql transactions on efficiency, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!