Home >> Latest Articles >> MySQL 8 Features: New features of MySQL 8.0

MySQL 8 Features: New features of MySQL 8.0

MySQL 8 Features: We have listed some new features of MySQL 8.0 such as Better Unicode Support, Window Functions, Roles in MySQL 8,Invisible indexes support and MySQL Data Dictionary.
What Is New MySQL 8 Features?

The following features of MySQL have been added to MySQL 8.0

  1. Character set support
  2. Window Functions
  3. Roles in MySQL 8.0
  4. Invisible indexes support
  5. MySQL Data Dictionary
  6. JSON Enhancements
1. Character set support:

The default character set has changed from latin1 to utf8mb4.

2. Window Functions:

MySQL now supports window functions. Window functions perform some calculation on a set of rows. It’s like a GROUP BY but preserving rows rather than collapsing them.

Window Function Description
CUME_DIST() Cumulative distribution value
ROW_NUMBER() Number of current row within its partition
RANK() Rank of current row within its partition, with gaps
DENSE_RANK() Rank of current row within its partition, without gaps
PERCENT_RANK() Percentage rank value
FIRST_VALUE() Value of argument from first row of window frame
LAST_VALUE() Value of argument from first row of window frame
3. Roles in MySQL 8.0:
  • MySQL 8.0 supports Roles, the ability of defining a set of privileges as a named role and then granting that set to one or more users
  • The main benefits are more clarity of privileges and ease of administration.
  • Using roles we can assign the same set of privileges to several users, and eventually modify or revoke all privileges at once.
4. Invisible indexes support:

MySQL 8.0 support Descending Indexes - DESC. Now the key values are stored in descending order. A descending index can be scanned in forward order, which is more efficient.

5. MySQL Data Dictionary:

MySQL now incorporates a transactional data dictionary that stores information about database objects. In previous MySQL releases, dictionary data was stored in metadata files and nontransactional tables

6. JSON Enhancements:

MySQL 8.0 added some new JSON functions and improves performance for sorting and grouping JSON values.

  • ->> has been added, this is the equivalent of JSON_UNQUOTE(JSON_EXTRACT())
  • New aggregation functions JSON_ARRAYAGG() and JSON_OBJECTAGG()
  • Added some more function like - JSON_TABLE() and JSON_PRETTY()
  • JSON utility function like JSON_STORAGE_SIZE() and JSON_STORAGE_FREE()
You may also like - React Js Interview Questions
Features Deprecated in MySQL 8.0:
  1. The utf8mb3 character set is deprecated in MySQL 8.0. Please use utf8mb4 instead.
  2. The PAD_CHAR_TO_FULL_LENGTH SQL mode is deprecated.
  3. The JSON_MERGE() function is deprecated. Use JSON_MERGE_PRESERVE() instead.
Full Stack Tutorials

Author @FullStackTutorials | View all Articles