The biggest change is that compared to MYSQL 5.7 in MYSQL 8, the atomicity of the data dictionary has been guaranteed. Whenever you perform DDL operations on data tables, there is always a feeling of panic because you can no longer rely on FRM and Idb files. Among these changes, there is an important change called "Serialized Dictionary Information"
Before MYSQL 5. MYSQL reads the FRM file when it is shut down and displays the table structure. MYSQL 8 will no longer have such a thing, and the toolset has actually been offline for a long time, so MYSQL 8 has introduced a new way to read data format files.
This tool is ibd2sdi
We can use ibd2sdi to read the table structure of the data when the system is started, and output it into json
Format.
The dictionary table cannot be viewed in MYSQL 8. If you need to view it, you need to add debug parameters when compiling MYSQL, and you need to run special commands to view the data. .
Why do we do this? The main reason is that the original MYSQL 5. way to store.
We have initially seen the information of SDI through the tool, but what exactly does SDI bring?
1 When performing DDL operations, inconsistency caused by non-transactional storage
2 Safe Crash when DDL operation fails
3 Avoids the challenging problem of copying because DDL is not atomic
4 The problem of difficult expansion of table structure
5 Added SDI cache, accelerated data query by adding metadata cache, and managed related CACHE through LRU
At the same time, this is also The disadvantage is that DDL may take more time, because it needs to rewrite the storage, undo log, redo log instead of directly writing to the frm file
The above picture is also a newly added function in 8.0. In the past, we read the status of the table directly, but in versions after mysql 8.014, adding the above parameters, the status of the read table is read from the cache. To refresh the cache, you can pass the challenge expiration time or analyze table.
The above is the detailed content of What are the new features of MYSQL8?. For more information, please follow other related articles on the PHP Chinese website!