This is the 9th day of my participation in Gwen Challenge
Didi ~ ideal every day more text, reality a few days a text, hengpi: text?
Hahaha helpless ah
This is the second time to write an article for a friend! Last time was the taste of love, this time is the fragrance of learning ha ha 😋
This is a summary of the new features in the major version of MySQL
So, let’s take a look
Let’s go straight to 👇
MySQL official documentation
You can see there are three versions 5.6, 5.7, 8.0
Well, since 5.5 is missing, let’s remember its main features:
innodb
Is from5.5This version starts to becomeDefault storage engine 😄- Introduced the true
UTF8
— >utf8mb4
Why only two points? Because those are the only two things in 4YE’s brain hahaha
Let’s start exploring 5.6 ~😄
5.6
MySQL 5.6 Release Notes
Open the link above, 👆, as shown below, to introduce this new feature
What Is New in MySQL 5.6
If you need complete information, please go to 😄. After all, in addition to the new features, there is also an introduction to InnoDB as a whole!
innodb
Here are the following enhancements to the storage engine InnoDB 🐷
-
Full-text indexes can be created
-
You can change the InnoDB page size of an uncompressed table to 8KB or 4KB, the default is 16KB
Note that only these three parameters are valid here (4, 8, 16).
Parameters: innodb_page_size
-
The maximum size of InnoDB’s redo log file was increased from 4 gigabytes to 512 gigabytes.
Parameters: innodb_log_file_size
-
Innodb compression level can be set from 0 to 9
Parameters: innodb_compression_level
-
Innodb moves flush from main to another thread
-
The default is ibD, a separate tablespace
-
Undo logs can be saved in a separate table space
Partitioning
The following enhancements have been made to the partition 🐖
-
The maximum number of partitions increased to 8192
-
Support to display partition selection
For example, SELECT * FROM t PARTITION (p0, p1) WHERE c < 5
MySQL NDB Cluster
Mysql Cluster, released as a standalone product in this release
Note that the storage engine is not the default InnoDB, but NDB
Replication and logging
Replication and logging
-
A binlog can be read from a remote server
Parameters:
– read – from – remote server, – R;
--raw
-
Delay replication
Parameter: CHANGE MASTER TO
Optimizer enhancements
Optimizer enhancement
-
This is where we start, and we can use EXPLAIN to view the execution plans for DELETE, INSERT, REPLACE, UPDATE, and other DML operations. Previously, it only supported SELECT operations.
-
Optimized subquery
-
The host cache
Configuration Changes
back_log |
50 | Autosized using max_connections |
---|---|---|
binlog_checksum |
NONE |
CRC32 |
--binlog-row-event-max-size |
1024 | 8192 |
flush_time |
1800 (on Windows) | 0 |
innodb_autoextend_increment |
8 | 64 |
innodb_buffer_pool_instances |
1 | 8 (platform dependent) |
innodb_checksum_algorithm |
INNODB |
CRC32 (changed back to INNODB in MySQL 5.6.7) |
innodb_concurrency_tickets |
500 | 5000 |
innodb_file_per_table |
0 |
1 |
innodb_old_blocks_time |
0 | 1000 |
innodb_open_files |
300 | Autosized using innodb_file_per_table .table_open_cache |
innodb_stats_on_metadata |
ON |
OFF |
join_buffer_size |
128KB | 256KB |
max_allowed_packet |
1MB | 4MB |
max_connect_errors |
10 | 100 |
sync_master_info |
0 | 10000 |
sync_relay_log |
0 | 10000 |
sync_relay_log_info |
0 | 10000 |
5.7
innodb
-
Add the DATA_GEOMETRY type to support spatial data types, previously bloBS
-
Innodb’s cache pool dump and load enhancements allow pages in the cache pool to be stored in percentage
Parameter: Innodb_buffer_pool_dump_pct Default value is 25
-
InnoDB has added support for full-text parser plug-ins.
-
Multithreading is supported to refresh dirty pages in the buffer pool
Memory data pages are called dirty because the contents of the data pages are inconsistent with those on disk
-
Innodb’s doublewrite is redundant because The fusion-io non-volatile Memory (NVM) file system provides atomic operations on Linux. Doublewrite is automatically disabled
-
The innodb_buffer_POOL_size parameter is dynamic, allowing you to resize the buffer pool without restarting the server.
-
InnoDB supports the use of spatial indexes to index spatial data types
-
Support for Local Partitions
-
The default row format is changed from Compact to DYNAMIC
other
Support JSON
As of MySQL 5.7.8, MySQL supports native JSON types.
Shocked (there is such a thing 🐖)
EXPLAIN can be used to get the execution plan of the explainable statement executed in the named connection
EXPLAIN [options] FOR CONNECTION connection_id;
Copy the code
Allow multiple trigger events at a certain point in time
BEFORE: For the combination of trigger events (INSERT, UPDATE, DELETE) and operation times (BEFORE, AFTER), a table can have at most one trigger, that is, only one trigger event at a certain point in time
4. Multi-source replication
You can back up the contents of multiple servers to one server
8.0
Suddenly found that each update is strengthening this innnodb 😄
innodb
-
You can check the number of index pages cached in the InnoDB buffer pool per index with INNODB_CACHED_INDEXES
-
Deadlock detection can be disabled using a new dynamic variable, innodb_deadlock_detect
-
Redo log optimization for concurrent writing to log buffers
-
The size of the log buffer can be dynamically adjusted with innodb_log_buffer_size
-
The undo log is no longer stored in the system table
-
Atomic DDL is supported to ensure complete success or failure of operations
-
As of MySQL 8.0.20, the Doublewrite buffer is stored in a Doublewrite file
other
Json enhancement
Default value
You can add default values BLOB, TEXT, GEOMETRY, and JSON for these types
Optimizer enhancement
- Support for hiding indexes
ALTER TABLE t1 ALTER INDEX i_idx INVISIBLE;
ALTER TABLE t1 ALTER INDEX i_idx VISIBLE;
Copy the code
- Indexes support descending sort
Support window function
Support regular expressions
(and 🐂 for this operation)
6. Backup lock
Allows the use of DML statements for online backup
conclusion
Which update will impress you the most after reading this article? 😝
For example, 4ye has a little impression on these points ~
-
Full text index of 5.6, innodb page size adjustment (4,8,16 KB), independent table space and execution plan enhancement, not only select. And the parameters of a table that’s that big at the end
-
5.7 JSON, spatial data type DATA_GEOMETRY, and spatial index spatial, doubleWrite, optimization of dirty pages, and row format DYNAMIC (formerly Compact)
-
8.0 re, hidden index and its index sort
Oh, and the first two sentences
innodb
Is from5.5This version starts to becomeDefault storage engine 😄- Introduced the true
UTF8
— >utf8mb4
The last
Welcome friends to discuss the question ~
If you think this article is good, please give it a thumbs-up 😝
Let’s start this unexpected meeting! ~
Welcome to leave a message! Thanks for your support! ヾ(≧▽≦*)o go!!
I’m 4ye and I’ll see you soon next time!!