BT

Ready for InfoQ 3.0? Try the new design and let us know what you think!

Preview of New Features in MySQL 8

| by Alex Giamas Follow 10 Followers on Feb 27, 2018. Estimated reading time: 2 minutes |

MySQL is gearing up for its 8th version, expected to be released in 2018. A full 28 months have passed since the first general release for MySQL 5.7.9, and there have already been five release candidates for MySQL 8, ranging from 8.0.0 to 8.0.4. These release candidates are only intended for development purposes and should not be used in production systems -- they are not supported for upgrades, and users may experience data format incompatibility between release candidates and general availability versions.

The first thing a user of MySQL might notice is the jump in version numbering. This is because version 6 was dropped and version 7 is reserved for the enterprise product line. Window functions is one of the most interesting features of MySQL 8. Already present in other database engines, window functions can perform aggregations on a group of query rows, producing a result for each row. Similar to window functions, Recursive Common Table Expressions lets users perform subqueries referring to its own name without the use of cursors. This presentation explains the subject in detail.

The default character set support is also changing from latin1 to utf8mb4. utf8mb4 uses up to four bytes per character and is the character set of preference for most use cases, as it supports extended collations like utf8mb4_ja_0900_as_cs for Japanese and also, emojis. On storage side, the default storage engine will be InnoDB.

Invisible indexes allow DBAs to exclude an index from the query optimiser in order to test if this index is improving performance or not, and stage indexes before actually enabling them for users. JSON support has improved significantly, with the addition of the JSON_EXTRACT() function that can extract data from a json field based on a path query argument. JSON_ARRAYAGG() and JSON_OBJECTAGG() aggregation functions can be used to combine data into JSON arrays and objects respectively.

Finally, MySQL 8 provides flexible roles support, with create, drop and grant to roles functionality and even granting roles to roles. Limiting roles per session and specifying hosts that can use roles are all available with MySQL 8. DBAs can also get a GraphML visualisation of the roles by calling the ROLES_GRAPHML() function.

MySQL 8 was scheduled to be released in October 2017, and while 8.0.4RC was released on 23rd January 23 2018, there appears to be at least another two release candidates scheduled before the GA version rolls out.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT