In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "what is the impact of mysql transactions on efficiency". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to 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 (16jerry2)); insert into acct values ('0001jerrycalendar, 1000), (2000); start transaction;-- start transaction update acct set balance = balance-100update acct set balance =' 0001";-- simulated withholding update acct set balance = balance + 100 where acct_no = '0002;-- simulated payee commit -- transaction commit rollback;-- transaction rollback
Knowledge point expansion:
Business
Atomicity: all operations of the entire transaction are either committed successfully or all failed rollback
Consistency: refers to a transaction that transitions a database from one consistency state to another without compromising the integrity of the database before and after the transaction begins.
Isolation: requires a transaction to modify the data in the database and be invisible to other transactions until the commit is completed
Persistence: once a transaction commits, its changes are permanently saved to the database. Even if the system crashes, the modified data that has been submitted will not be lost.
Big business
Transactions that take a long time to run and operate more data
Locking too much data, causing a lot of blocking and lock timeouts
Rollback takes a long time
The execution time is long, which is easy to cause master-slave delay.
How to handle big business:
Avoid dealing with too much data at once
Remove unnecessary select operations in a transaction
At this point, I believe you have a deeper understanding of "what is the impact of mysql transactions on efficiency". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.