Quantcast
Channel: Percona Database Performance Blog
Viewing all articles
Browse latest Browse all 1785

New Features in Percona Server for MySQL 8.0.23-14

$
0
0
New Features in Percona Server for MySQL 8.0.23

New Features in Percona Server for MySQL 8.0.23Percona Server for MySQL 8.0.23-14 was released last week and I wanted to take a minute to call out some of the interesting new features that we have introduced in this release. These are included in addition to the features and improvements in MySQL 8.0.23 that were introduced by the Oracle MySQL team (and to which Percona also contributed).

Hashicorp Vault Plugin Support for KV Secrets Engine – Version 2 (PS-5364)

As of Percona Server for MySQL 8.0.23-14, the Hashicorp Vault plugin can be configured to specifically use either V1 or V2 Secrets Engine API or it can be configured to probe and auto-detect the best version to use.

See the documentation here.

Adaptive Network Buffers (PS-7364)

When long-lived connections are used or connections are “pooled”, network buffers tend to grow towards max_allowed_packet size and never shrink automatically until the connection is terminated. For example, an occasional big query will eventually increase the size of the network buffers of all of the connections within a connection pool (assuming connections are picked at random from the pool). A large value of max_allowed_packet_size, like 64-128Mb, combined with a significant number of connections (> 256) may lead to enormous memory overhead.

This feature adds the ability to periodically shrink a connection’s network buffer size at a specified interval.

See the documentation here.

Credit for this goes to Evgeniy Firsov, who submitted the original idea to us.

X Plugin – Reconfigure TLS Certificate at Runtime (PS-7125)

As of 8.0.16, it is possible to configure the server’s TLS certificate at runtime, but this did not extend to the TLS context used by other enabled server plugins or components such as the X Plugin. As of Percona Server for MySQL 8.0.23-14, we have added a callback to the plugin interface, which notifies plugins when a user executes ALTER INSTANCE RELOAD TLS;

The X Plugin now implements this callback and reloads certificates correctly.

MyRocks – Secondary Index and Non-Binary Collation Performance Optimization (PS-6780)

Prior to Percona Server for MySQL 8.0.23-14, character indexes that were based on non-binary collations required a Primary Key lookup in order to obtain the ‘decoded’ or original column data that the index was based upon. Now, as of Percona Server for MySQL 8.0.23-14, new indexes will also store the original decoded column values with the encoded index value, and covering index scans can be truly covered with MyRocks. Existing indexes will need to be rebuilt (and will occupy more space) in order to take advantage of this performance improvement. As a result of this change, the need for the options and functionality behind “rocksdb_strict_collation_check” and “rocksdb_strict_collation_exceptions” no longer exists, and as such these options have been deprecated.

MyRocks – DEFAULT Value Expressions (PS-5846)

Prior to Percona Server 8.0.23-14, MyRocks did support the use of DEFAULT value expressions on CREATE or ALTER TABLE statements. For example, if were to execute:

CREATE TABLE `t1` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`subject` text COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT (''),
PRIMARY KEY (`id`)
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

You would receive the error “3774 – ‘Specified storage engine’ is not supported for default value expressions.”. As of 8.0.23-14, DEFAULT value expressions are now supported with MyRocks.

MyRocks – GENERATED Columns (PS-4894)

I saved the best for last, as of Percona Server for MySQL 8.0.23-14, MyRocks now supports the use of generated columns which may be either VIRTUAL or STORED. This allows indexes to be created against these generated columns for some pretty powerful functionality. This is particularly useful for indexing JSON types. Let us take a very quick look at a contrived example. Start with a simple table:

CREATE TABLE `t` (
`id` int NOT NULL AUTO_INCREMENT,MyRocks - GENERATED columns (PS-4894)
`doc` json DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=RocksDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

Now, we know our json documents have a field called ‘name’ that we would like to index on, so, first, we create a generated column:

ALTER TABLE `t` ADD `name` char(80) AS (doc->>"$.name");

Then we add our new index on that column:

ALTER TABLE `t` ADD INDEX `n` (`name`);

Voila!

Read more about this release here and download it here. Thank you for your continued interest in our Percona Software!


Viewing all articles
Browse latest Browse all 1785

Trending Articles