Home >Backend Development >PHP Tutorial >Detailed introduction to the new features of MySQL version 8.0
MySQL development team announces the release of MySQL 8.0.0 Development Milestone Release (DMR)! Afterwards, some people may wonder why MySQL jumped from 5.x to 8.0. In fact, the MySQL 5.x series has continued for many years, starting from 5.1 before being acquired by Oracle, and has remained at 5.x since the acquisition, such as 5.5, 5.6, 5.7 and so on. In fact, if you follow the original release rhythm, you can think of 5.6.x as 6.x and 5.7.x as 7.x. Therefore, we just changed the version naming method.
MySQL is the standard configuration in many website technology stacks. It is a popular open source database and has launched the first release candidate version of 8.0.
New features in MySQL 8.0 include:
Complete support for Unicode 9.0 out of the box
Support for window functions and recursive SQL syntax, which was not possible before Or it is difficult to write such query statements
Enhanced support for native JSON data and document storage capabilities
The release of MySQL 8.0, skipping multiple version numbers (starting from 5.5), Since the 6.0 modification and 7.0 are used to retain the cluster version of MySQL, the version number of 8.0 is adopted.
The expected release date of MySQL 8.0
According to MySQL's policy "the release cycle of a new [general] version is 18-24 months", MySQL has not committed to the release date of MySQL 8.0 . The last release of MySQL 5.7 was on October 21, 2015, so the official version of MySQL 8.0 may be released in October 2017.
The road to standardizing Unicode in MySQL 8.0
Default support for Unicode can be said to be one of the biggest changes in MySql 8.0. For a long time, MySQL has had many unresolved problems with Unicode. So, a long-term plan for MySQL 8.0 is to fix as many of those ongoing Unicode issues as possible.
MySQL 8.0 no longer sets latin1 as the default encoding to prevent new users from using this problematic legacy option. utf8mb4 is now recommended as the default character set for MySQL 8.0. It is intended to be faster than the now-deprecated utf8mb3 character set, while also enabling more flexible sorting and case sensitivity.
Enhanced Unicode not only supports non-Western character sets but also supports the growing emoji expressions.
MySQL 8.0 supports window functions
Many implementations of SQL language standards (such as Oracle, translator's note) support window functions, which can implement aggregation calculations across multiple rows and still Allows access to individual rows from the query. In previous MySQL versions, it was possible to do this without using window functions, but it was cumbersome and slow. In order to overcome this shortcoming, MySQL 8.0 implements the function of window functions through the standard SQL keyword OVER, which is somewhat similar to the implementation method of its competitor PostgreSQL.
Also another feature is recursive common table expressions, which allow you to perform recursive operations on subqueries without using cursors or other performance-degrading workarounds.
MySQL 8.0 better supports document databases and JSON
MySQL 5.7 supports JSON, which allows MySQL to use native JSON to compete with NoSQL databases. MySQL 8.0 has expanded support for JSON and has better performance, adding the ability to return ranges from JSON queries (just like the "top n" function of the SQL statement), and also adding new aggregate functions that can be used in the same query. In the statement, MySQL native structured data and JSON semi-structured data can be combined.
Another JSON-related improvement includes MySQL’s document storage. Reads and writes to the MySQL document store are transactionally consistent, allowing rollback of changes to JSON data. Document data is stored in the open GeoJSON format for geospatial data and can be indexed so it can be searched in a directed manner.
Other key features of MySQL 8.0
Other features planned for MySQL 8.0 updates include:
Added more options for locking rows, such as SKIP LOCKED and NOWAIT options. Among them,
SKIP LOCKED allows rows that need to be ignored not to be locked during the operation; NOWAIT immediately throws an error when a row lock is encountered.
MySQL can scale and expand based on the total amount of available memory to better utilize the deployment of virtual machines.
Added the "hidden index" feature so that the index can become invisible in the query optimizer. Indexes marked as unavailable are synchronized with table data changes, but the optimizer does not use them. The suggestion for using hidden indexes is that they can be used when it is not decided whether an index needs to be retained.
Now you can download MySQL 8.0 for Windows, MacOS, several versions of Linux, FreeBSD and Solaris; you can also download the source code. You can visit the developer candidate versions on the download page of the official website to download them.
The above is the detailed content of Detailed introduction to the new features of MySQL version 8.0. For more information, please follow other related articles on the PHP Chinese website!