Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Excerpts from MySQL- official documents

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Click (here) to collapse or open

There are three phases to an index build.

In the first phase, the clustered index is scanned, and index entries are generated and added to the sort buffer. When the sort buffer becomes full, entries are sorted and written out to a temporary intermediate file. This process is also known as a "run". In the second phase, with one or more runs written to the temporary intermediate file, a merge sort is performed on all entries in the file.In the third and final phase, the sorted entries are inserted into the B-tree.

Click (here) to collapse or open

When running an online DDL operation, the thread that runs the ALTER TABLE statement applies an "online log" of DML operations that were run concurrently on the same table from other connection threads. When the DML operations are applied, it is possible to encounter a duplicate key entry error (ERROR 1062 (23000): Duplicate entry), even if the duplicate entry is only temporary and would be reverted by a later entry in the "online log". This is similar to the idea of a foreign key constraint check in InnoDB in which constraints must hold during a transaction.

Click (here) to collapse or open

Semisynchronous Replication

The slave acknowledges receipt of a transaction's events only after the events have been written to its relay log and flushed to disk.

Semi-synchronization is only responsible for the release of relaylog, and does not care whether Slave really applies these events, so the normal double 1 + semi-synchronization of Master can confirm that binlog is on the Slave side, and Slave can achieve final consistency without problems.

Click (here) to collapse or open

Innodb_lock_wait_timeout applies to InnoDB row locks only. A MySQL table lock does not happen inside InnoDB and this timeout does not apply to waits for table locks.

The lock wait timeout value does not apply to deadlocks when innodb_deadlock_detect is enabled (the default) because InnoDB detects deadlocks immediately and rolls back one of the deadlocked transactions. When innodb_deadlock_detect is disabled, InnoDB relies

On innodb_lock_wait_timeout for transaction rollback when a deadlock occurs.

For example, metadata lock

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report