Chapter Twenty-lock problem

table_lock_wait that they can not immediately acquire a lock data, table_lock_immediate represents the number of queries immediately won the locks. If the engine is myisam table table_lock_wait value is relatively large, it means there are performance problems, high concurrency, the best storage engine changed to innodb engine, in innodb engine, table_lock_wait value is almost useless. Unlike innodb_lock_wait table_lock_wait

 

 

 

First clustered index (Clustered Index) also called clustered index, the index clustering, clustering index;

 The so-called clustered index, refers to the main index and data files to the same document, the leaf node that is the clustered index is the data node (Myisam Africa clustered index index files and data files are not the same document, the index file leaves the physical address of the node to store data), mainly used in the clustered index Innodb storage engine. In this implementation, the index B + data on Tree leaf node is the data itself, key-based key.

Then the process of the establishment of the clustered index is what it?

Innodb a table in the process of establishing a clustered index:

1) When there is a primary key, creating a clustered index based on the primary key
2) when no primary key, will use a unique and do not allow the primary key is empty index column, become clustered index on this table
3) If the above two are not met it creates a virtual innodb own primary key field, the field length is 6 bytes long integer type, create a clustered index key based on the virtual master

 

Published 301 original articles · 197 won praise · views 270 000 +

Guess you like

Origin blog.csdn.net/boss_way/article/details/105163335