How can we avoid deadlocks in applications? _ MySQL

Source: Internet
Author: User
An inevitable feature of any lock-based concurrent system is that the system may be congested under certain conditions. When one connection occupies one lock and another connection tries to change the lock status, the second connection either waits for the first connection to release the lock or is blocked as a result. To achieve the best scalability, performance, and concurrency, when designing applications and query statements, you should minimize the length of transactions and reduce the lock occupation time. Most concurrency problems often occur in the design phase of applications and databases. therefore, one unavoidable feature of any lock-based concurrency system is that the system may be congested under certain conditions if this factor is fully taken into account during the design phase. When one connection occupies one lock and another connection tries to change the lock status, the second connection either waits for the first connection to release the lock or is blocked as a result.

To achieve the best scalability, performance, and concurrency, when designing applications and query statements, you should minimize the length of transactions and reduce the lock occupation time. Most concurrency problems often occur in the design phase of applications and databases. Therefore, it is critical to take this factor into full consideration during the design phase. Otherwise, applications may have potential defects, which are generally discovered only during application scalability tests.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.