SlideShare a Scribd company logo
MariaDB 10.11
key features overview for DBAs
Why this talk?
● Features are only good if you use them
● You only use features you know
● MariaDB is very good at developing features
● But not as good at documenting and advertising them
The importance of documentation
mariadb.org/kb
● MariaDB KnowledgeBase is a public wiki
○ You can contribute under the terms of
CC BY-SA / GNU FDL
○ The KB has pages on how to contribute
Or you can write your own blog posts
The importance of documentation
MariaDB
versions
MariaDB Versions
MariaDB 10.6 Latest LTS (Long Term Support)
Supported until July 2026
MariaDB 10.7 Stable STS (Short Term Support)
MariaDB 10.8 Stable STS
MariaDB 10.9 Stable STS
MariaDB 10.10 Alpha STS
MariaDB 10.11 Stable LTS
EOL: February 2028
MariaDB 11.0 RC
MariaDB 11.1 Alpha
● Maturity levels:
Alpha / Beta / Gamma / RC / Stable
● STS versions shouldn’t be used in production
○ (sort of)
○ Because they’re only supported for 1 year
● LTS support is 4 years
● We’re going to cover the most important features included in
STSs, that you can expect to see in the next LTS
● “Most important” according to my opinion, our internal
discussions, and our customers needs.
Others may disagree
● In a logical order, not in a chronological order
● I will not assume that you are an expert
This talk
Replication / HA
Replication / HA
“Lag-free” ALTER TABLE MDEV-11675 10.8
Galera IP Allowlist for SST MDEV-27246 10.10
JSON SST progress logging MDEV-26971 10.9
● Previously, ALTER TABLE was executed on the master first
● Only after it succeeded, it started on the replicas
● This usually blocked replication until completion
● And ALTER TABLE can take a lot of time on big tables
“Lag-free” ALTER TABLE
You run:
SET SESSION binlog_alter_two_phase = 1;
ALTER TABLE atest CHANGE COLUMN b b BIGINT SIGNED NOT NULL;
Binary log says:
ALTER TABLE atest CHANGE COLUMN b b BIGINT SIGNED NOT NULL
DEFAULT 1
#230425 21:29:41 server id 1 end_log_pos 1087 CRC32
0xb1f3cec6 GTID 0-1-5 ddl START ALTER
#230425 21:29:41 server id 1 end_log_pos 1271 CRC32
0x1b978324 GTID 0-1-6 ddl COMMIT ALTER id= 5
“Lag-free” ALTER TABLE
● ALTER TABLE starts on master, and then it can start
immediately on replicas
● Even if it’s faster on replicas, it will only be finalised when it
completes on master
● If it fails on master, replicas will stop the operation
“Lag-free” ALTER TABLE
SST = State Snapshot Transfer
IST = Incremental Snapshot Transfer
● When a new Galera node joins a cluster it receives an SST
● When a node restarts:
○ ideally it receives an IST
○ if the Galera Cache doesn’t contain all the changes that
happened since it disconnected, it receives an SST
● It’s a good practice to keep Galera in a private network, so
unknown nodes can’t request an SST/IST
Galera allowlist for SST and SSI
● Now we can use wsrep_allowlist:
wsrep_allowlist = '11.11.11.11,22.22.22.22,33.33.33.33'
● It accepts IPv4 and 6
○ No IP ranges, no hostnames, no wildcards
● Requires a node restart, should be done on all nodes one by
one
● The mysql.wsrep_allowlist table shows the allowlist
Galera allowlist for SST and SSI
● It was a bit hard to debug SST failures based on the error log
● Now SST is logged into wsrep_status.json
● The format is both human-readable and machine-readable
SST logging in JSON
{
"date": "2021-09-04 15:35:02.000",
"timestamp": 1630758902.00000000,
"errors": [
{
"timestamp": 1630758901.00000000,
"msg": "mysqld: Can't open shared library
'/tmp/galera/0/mysql/lib64/mysql/plugin/audit_log.so' (errno: 0, cannot open shared object file: No such file or
directory)"
}
],
"warnings": [ …
],
"status": {
"state": "DISCONNECTED",
"comment": "Disconnected",
"progress": -1.00000
}
}
SST logging in JSON
Performance
Performance
More dynamic configuration MDEV-27812
MDEV-19229
and others
10.9
10.11
Faster INSERTs into empty tables MDEV-24621 10.7
ASC / DESC indexes 10.8
JSON histograms MDEV-26971 10.8
Faster collations Multi
● These variables are now dynamic:
● innodb_log_file_size
● innodb_undo_tablespaces
● innodb_write_io_threads and
innodb_read_io_threads
● innodb_buffer_pool_chunk_size is now allocated
dynamically
● replicate_rewrite_db is now a variable
More dynamic configuration
● INSERTs into empty tables already improved in 10.6, more
optimisation was made in 10.7
● Especially when the table has indexes (not just the primary
key)
Faster INSERTs
● The ASC and DESC syntaxes were accepted but had no
meaning with older versions:
ALTER TABLE post ADD INDEX (date DESC, author ASC);
● Now they work. Each column in an index can be ascending
(default) or descending
● It’s important to optimise queries that need to order columns
in different directions:
SELECT *
FROM post
ORDER BY date DESC, author ASC;
ASC / DESC indexes
● Statistics are estimations about data distribution in tables,
indexes and columns
● They are used by the Optimiser to determine the fastest
query plan
● In previous versions MariaDB implemented:
○ Engine-independent statistics
○ Histograms
JSON Histograms
● Regular statistics are just number of values, number of unique
values (cardinality)
● Histograms are actual histograms about the distribution of ranges
of values in a column (not index)
● JSON histograms allow more granular and precise statistics
● Useful for JOINs with a WHERE that doesn’t use indexes
● JSON histograms are used if they exist, but they need to be
created explicitly:
ANALYZE TABLE tbl PERSISTENT FOR ALL;
ANALYZE TABLE tbl PERSISTENT FOR COLUMNS (column_list);
JSON Histograms
● A character set defines which characters may exist in a
column
● A collation defines how to order these characters
● And, for example, if some characters are the same (A and a,
a and à, etc…)
● This affects all comparisons and sorting:
>, <, =, ORDER BY, GROUP BY…
● Recent versions implemented several optimisations
● Like the “group comparison” for characters that are included
in the ASCII character set
Faster collations
New Data Types
INET6 was already supported
UUID() function was already supported
Data Types
UUID 4B 10.7
INET4 16B 10.9
● Problems with AUTO__INCREMENT
○ InnoDB has an auto_increment lock
■ (will be removed in a future version)
○ Once you reach the end, you can't insert new values
○ It's guessable (potential security problem)
UUID Primary Key
CREATE TABLE user (
username
id UUID NOT NULL DEFAULT UUID(),
PRIMARY KEY (id)
);
INSERT INTO user (username)
VALUES ('tom.baker');
UUID Primary Key
New Functions
Functions
SFORMAT() MDEV-25015 10.7
NATURAL_SORT_KEY() MDEV-4742 10.7
RANDOM_BYTES() MDEV-25704 10.10
JSON_EQUALS() MDEV-23143 10.7
JSONPath enhancements MDEV-27911
MDEV-22224
10.9
● Concatenating strings with CONCAT() can lead to
unreadable queries
○ Especially if you need to handle NULLs
● SFORMAT() enables more modern interpolation, based on
the fmt library
> SELECT SFORMAT('{} + {} = {}', 3, 5, (3 + 5)) AS str;
+-----------+
| str |
+-----------+
| 3 + 5 = 8 |
+-----------+
SFORMAT()
> SELECT SFORMAT('{2} - {1} = {0}', 3, 5, (3 + 5)) AS str;
+-----------+
| str |
+-----------+
| 8 - 5 = 3 |
+-----------+
> SELECT SFORMAT('{:d}th son of a {:d}th son', 7, 7) AS
iron_maiden;
+----------------------+
| iron_maiden |
+----------------------+
| 7th son of a 7th son |
+----------------------+
SFORMAT()
● Strings are ordered alphabetically, according to a collation
● But some strings contain numbers or separators. In that
case, the order decided by a collation alone is different than
what humans expect:
> SELECT ip FROM impression ORDER BY 1;
+-----------------+
| ip |
+-----------------+
| 100.120.122.200 |
| 110.120.122.200 |
| 80.222.120.200 |
| 80.1.120.200 |
+-----------------+
NATURAL_SORT_KEY()
● NATURAL_SORT_KEY() solves the problem by producing a
modified version of the string that will be sorted correctly:
> SELECT ip, NATURAL_SORT_KEY(ip) FROM impression ORDER BY 2;
+-----------------+----------------------+
| ip | NATURAL_SORT_KEY(ip) |
+-----------------+----------------------+
| 80.120.2.200 | 180.2120.02.2200 |
| 99.120.122.200 | 199.2120.2122.2200 |
| 100.120.122.200 | 2100.2120.2122.2200 |
| 110.120.122.200 | 2110.2120.2122.2200 |
+-----------------+----------------------+
NATURAL_SORT_KEY()
● In practice you don’t need to see that modified string:
> SELECT ip FROM impression ORDER BY NATURAL_SORT_KEY(ip);
+-----------------+
| ip |
+-----------------+
| 80.120.2.200 |
| 99.120.122.200 |
| 100.120.122.200 |
| 110.120.122.200 |
+-----------------+
NATURAL_SORT_KEY()
● JSON_EQUALS() compares two JSON documents ignoring
spaces, the keys order, etc
● Some functions accept JSONPath expressions to find a part
of a JSON document. Now MariaDB JSONPath supports:
○ Array ranges
SELECT JSON_EXTRACT(json_arr, '$[2 to 5]');
○ Negative indexes
SELECT JSON_EXTRACT(json_arr, '$[-1]');
JSON
https://vettabase.com/services
● Migrations to/from MariaDB
● Upgrades (tests, no downtime)
● Database health checks
● Training for DBAs, devops, developers, data analysts
● And more
MariaDB, MySQL, PostgreSQL, Cassandra
All major cloud providers

More Related Content

What's hot

How to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL serversHow to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL servers
Simon J Mudd
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
Sveta Smirnova
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
I Goo Lee
 
New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12
Sergey Petrunya
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
MySQL Cluster performance best practices
MySQL Cluster performance best practicesMySQL Cluster performance best practices
MySQL Cluster performance best practices
Mat Keep
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
ProxySQL in the Cloud
ProxySQL in the CloudProxySQL in the Cloud
ProxySQL in the Cloud
René Cannaò
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
NeoClova
 
How to use histograms to get better performance
How to use histograms to get better performanceHow to use histograms to get better performance
How to use histograms to get better performance
MariaDB plc
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTID
Mydbops
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Morgan Tocker
 
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStoreMariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB plc
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScale
MariaDB plc
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
MariaDB plc
 
MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
Mydbops
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
NeoClova
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
Sveta Smirnova
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
Wagner Bianchi
 

What's hot (20)

How to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL serversHow to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL servers
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
 
MySQL Cluster performance best practices
MySQL Cluster performance best practicesMySQL Cluster performance best practices
MySQL Cluster performance best practices
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 
ProxySQL in the Cloud
ProxySQL in the CloudProxySQL in the Cloud
ProxySQL in the Cloud
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
How to use histograms to get better performance
How to use histograms to get better performanceHow to use histograms to get better performance
How to use histograms to get better performance
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTID
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStoreMariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStore
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScale
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
 
MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
 

Similar to MariaDB 10.11 key features overview for DBAs

Recent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy lifeRecent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy life
Federico Razzoli
 
[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...
[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...
[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...
Insight Technology, Inc.
 
How to leave the ORM at home and write SQL
How to leave the ORM at home and write SQLHow to leave the ORM at home and write SQL
How to leave the ORM at home and write SQL
MariaDB plc
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
sqlserver.co.il
 
Cassandra 2012
Cassandra 2012Cassandra 2012
Cassandra 2012
beobal
 
PgconfSV compression
PgconfSV compressionPgconfSV compression
PgconfSV compression
Anastasia Lubennikova
 
M|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStoreM|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStore
MariaDB plc
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
FromDual GmbH
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
FromDual GmbH
 
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
MariaDB plc
 
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgradeDevelopers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
mCloud
 
RocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesRocksDB Performance and Reliability Practices
RocksDB Performance and Reliability Practices
Yoshinori Matsunobu
 
Understanding the architecture of MariaDB ColumnStore
Understanding the architecture of MariaDB ColumnStoreUnderstanding the architecture of MariaDB ColumnStore
Understanding the architecture of MariaDB ColumnStore
MariaDB plc
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
PGConf APAC
 
Performance improvements in PostgreSQL 9.5 and beyond
Performance improvements in PostgreSQL 9.5 and beyondPerformance improvements in PostgreSQL 9.5 and beyond
Performance improvements in PostgreSQL 9.5 and beyond
Tomas Vondra
 
MySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.comMySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.com
Jean-François Gagné
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDB
PingCAP
 
PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12
Andrew Dunstan
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 

Similar to MariaDB 10.11 key features overview for DBAs (20)

Recent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy lifeRecent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy life
 
[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...
[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...
[db tech showcase Tokyo 2017] C23: Lessons from SQLite4 by SQLite.org - Richa...
 
How to leave the ORM at home and write SQL
How to leave the ORM at home and write SQLHow to leave the ORM at home and write SQL
How to leave the ORM at home and write SQL
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
 
Cassandra 2012
Cassandra 2012Cassandra 2012
Cassandra 2012
 
PgconfSV compression
PgconfSV compressionPgconfSV compression
PgconfSV compression
 
M|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStoreM|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStore
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
 
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
 
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgradeDevelopers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
 
RocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesRocksDB Performance and Reliability Practices
RocksDB Performance and Reliability Practices
 
Understanding the architecture of MariaDB ColumnStore
Understanding the architecture of MariaDB ColumnStoreUnderstanding the architecture of MariaDB ColumnStore
Understanding the architecture of MariaDB ColumnStore
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
Performance improvements in PostgreSQL 9.5 and beyond
Performance improvements in PostgreSQL 9.5 and beyondPerformance improvements in PostgreSQL 9.5 and beyond
Performance improvements in PostgreSQL 9.5 and beyond
 
MySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.comMySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.com
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDB
 
PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 

More from Federico Razzoli

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
High-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deploymentHigh-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deployment
Federico Razzoli
 
Webinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDBWebinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDB
Federico Razzoli
 
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best Practices
Federico Razzoli
 
A first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli
 
MariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
Federico Razzoli
 
Webinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstrationWebinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstration
Federico Razzoli
 
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Federico Razzoli
 
Advanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdfAdvanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdf
Federico Razzoli
 
Automate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with AnsibleAutomate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with Ansible
Federico Razzoli
 
Creating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDBCreating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDB
Federico Razzoli
 
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructures
Federico Razzoli
 
Playing with the CONNECT storage engine
Playing with the CONNECT storage enginePlaying with the CONNECT storage engine
Playing with the CONNECT storage engine
Federico Razzoli
 
MariaDB Temporal Tables
MariaDB Temporal TablesMariaDB Temporal Tables
MariaDB Temporal Tables
Federico Razzoli
 
Database Design most common pitfalls
Database Design most common pitfallsDatabase Design most common pitfalls
Database Design most common pitfalls
Federico Razzoli
 
MySQL and MariaDB Backups
MySQL and MariaDB BackupsMySQL and MariaDB Backups
MySQL and MariaDB Backups
Federico Razzoli
 
JSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB DatabasesJSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB Databases
Federico Razzoli
 
How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2
Federico Razzoli
 
MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)
Federico Razzoli
 
Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)
Federico Razzoli
 

More from Federico Razzoli (20)

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
High-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deploymentHigh-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deployment
 
Webinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDBWebinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDB
 
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best Practices
 
A first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
 
MariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
 
Webinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstrationWebinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstration
 
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
 
Advanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdfAdvanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdf
 
Automate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with AnsibleAutomate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with Ansible
 
Creating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDBCreating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDB
 
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructures
 
Playing with the CONNECT storage engine
Playing with the CONNECT storage enginePlaying with the CONNECT storage engine
Playing with the CONNECT storage engine
 
MariaDB Temporal Tables
MariaDB Temporal TablesMariaDB Temporal Tables
MariaDB Temporal Tables
 
Database Design most common pitfalls
Database Design most common pitfallsDatabase Design most common pitfalls
Database Design most common pitfalls
 
MySQL and MariaDB Backups
MySQL and MariaDB BackupsMySQL and MariaDB Backups
MySQL and MariaDB Backups
 
JSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB DatabasesJSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB Databases
 
How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2
 
MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)
 
Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)
 

Recently uploaded

Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 

Recently uploaded (20)

Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 

MariaDB 10.11 key features overview for DBAs

  • 1. MariaDB 10.11 key features overview for DBAs
  • 3. ● Features are only good if you use them ● You only use features you know ● MariaDB is very good at developing features ● But not as good at documenting and advertising them The importance of documentation
  • 4. mariadb.org/kb ● MariaDB KnowledgeBase is a public wiki ○ You can contribute under the terms of CC BY-SA / GNU FDL ○ The KB has pages on how to contribute Or you can write your own blog posts The importance of documentation
  • 6. MariaDB Versions MariaDB 10.6 Latest LTS (Long Term Support) Supported until July 2026 MariaDB 10.7 Stable STS (Short Term Support) MariaDB 10.8 Stable STS MariaDB 10.9 Stable STS MariaDB 10.10 Alpha STS MariaDB 10.11 Stable LTS EOL: February 2028 MariaDB 11.0 RC MariaDB 11.1 Alpha
  • 7. ● Maturity levels: Alpha / Beta / Gamma / RC / Stable ● STS versions shouldn’t be used in production ○ (sort of) ○ Because they’re only supported for 1 year ● LTS support is 4 years
  • 8. ● We’re going to cover the most important features included in STSs, that you can expect to see in the next LTS ● “Most important” according to my opinion, our internal discussions, and our customers needs. Others may disagree ● In a logical order, not in a chronological order ● I will not assume that you are an expert This talk
  • 10. Replication / HA “Lag-free” ALTER TABLE MDEV-11675 10.8 Galera IP Allowlist for SST MDEV-27246 10.10 JSON SST progress logging MDEV-26971 10.9
  • 11. ● Previously, ALTER TABLE was executed on the master first ● Only after it succeeded, it started on the replicas ● This usually blocked replication until completion ● And ALTER TABLE can take a lot of time on big tables “Lag-free” ALTER TABLE
  • 12. You run: SET SESSION binlog_alter_two_phase = 1; ALTER TABLE atest CHANGE COLUMN b b BIGINT SIGNED NOT NULL; Binary log says: ALTER TABLE atest CHANGE COLUMN b b BIGINT SIGNED NOT NULL DEFAULT 1 #230425 21:29:41 server id 1 end_log_pos 1087 CRC32 0xb1f3cec6 GTID 0-1-5 ddl START ALTER #230425 21:29:41 server id 1 end_log_pos 1271 CRC32 0x1b978324 GTID 0-1-6 ddl COMMIT ALTER id= 5 “Lag-free” ALTER TABLE
  • 13. ● ALTER TABLE starts on master, and then it can start immediately on replicas ● Even if it’s faster on replicas, it will only be finalised when it completes on master ● If it fails on master, replicas will stop the operation “Lag-free” ALTER TABLE
  • 14. SST = State Snapshot Transfer IST = Incremental Snapshot Transfer ● When a new Galera node joins a cluster it receives an SST ● When a node restarts: ○ ideally it receives an IST ○ if the Galera Cache doesn’t contain all the changes that happened since it disconnected, it receives an SST ● It’s a good practice to keep Galera in a private network, so unknown nodes can’t request an SST/IST Galera allowlist for SST and SSI
  • 15. ● Now we can use wsrep_allowlist: wsrep_allowlist = '11.11.11.11,22.22.22.22,33.33.33.33' ● It accepts IPv4 and 6 ○ No IP ranges, no hostnames, no wildcards ● Requires a node restart, should be done on all nodes one by one ● The mysql.wsrep_allowlist table shows the allowlist Galera allowlist for SST and SSI
  • 16. ● It was a bit hard to debug SST failures based on the error log ● Now SST is logged into wsrep_status.json ● The format is both human-readable and machine-readable SST logging in JSON
  • 17. { "date": "2021-09-04 15:35:02.000", "timestamp": 1630758902.00000000, "errors": [ { "timestamp": 1630758901.00000000, "msg": "mysqld: Can't open shared library '/tmp/galera/0/mysql/lib64/mysql/plugin/audit_log.so' (errno: 0, cannot open shared object file: No such file or directory)" } ], "warnings": [ … ], "status": { "state": "DISCONNECTED", "comment": "Disconnected", "progress": -1.00000 } } SST logging in JSON
  • 19. Performance More dynamic configuration MDEV-27812 MDEV-19229 and others 10.9 10.11 Faster INSERTs into empty tables MDEV-24621 10.7 ASC / DESC indexes 10.8 JSON histograms MDEV-26971 10.8 Faster collations Multi
  • 20. ● These variables are now dynamic: ● innodb_log_file_size ● innodb_undo_tablespaces ● innodb_write_io_threads and innodb_read_io_threads ● innodb_buffer_pool_chunk_size is now allocated dynamically ● replicate_rewrite_db is now a variable More dynamic configuration
  • 21. ● INSERTs into empty tables already improved in 10.6, more optimisation was made in 10.7 ● Especially when the table has indexes (not just the primary key) Faster INSERTs
  • 22. ● The ASC and DESC syntaxes were accepted but had no meaning with older versions: ALTER TABLE post ADD INDEX (date DESC, author ASC); ● Now they work. Each column in an index can be ascending (default) or descending ● It’s important to optimise queries that need to order columns in different directions: SELECT * FROM post ORDER BY date DESC, author ASC; ASC / DESC indexes
  • 23. ● Statistics are estimations about data distribution in tables, indexes and columns ● They are used by the Optimiser to determine the fastest query plan ● In previous versions MariaDB implemented: ○ Engine-independent statistics ○ Histograms JSON Histograms
  • 24. ● Regular statistics are just number of values, number of unique values (cardinality) ● Histograms are actual histograms about the distribution of ranges of values in a column (not index) ● JSON histograms allow more granular and precise statistics ● Useful for JOINs with a WHERE that doesn’t use indexes ● JSON histograms are used if they exist, but they need to be created explicitly: ANALYZE TABLE tbl PERSISTENT FOR ALL; ANALYZE TABLE tbl PERSISTENT FOR COLUMNS (column_list); JSON Histograms
  • 25. ● A character set defines which characters may exist in a column ● A collation defines how to order these characters ● And, for example, if some characters are the same (A and a, a and à, etc…) ● This affects all comparisons and sorting: >, <, =, ORDER BY, GROUP BY… ● Recent versions implemented several optimisations ● Like the “group comparison” for characters that are included in the ASCII character set Faster collations
  • 27. INET6 was already supported UUID() function was already supported Data Types UUID 4B 10.7 INET4 16B 10.9
  • 28. ● Problems with AUTO__INCREMENT ○ InnoDB has an auto_increment lock ■ (will be removed in a future version) ○ Once you reach the end, you can't insert new values ○ It's guessable (potential security problem) UUID Primary Key
  • 29. CREATE TABLE user ( username id UUID NOT NULL DEFAULT UUID(), PRIMARY KEY (id) ); INSERT INTO user (username) VALUES ('tom.baker'); UUID Primary Key
  • 31. Functions SFORMAT() MDEV-25015 10.7 NATURAL_SORT_KEY() MDEV-4742 10.7 RANDOM_BYTES() MDEV-25704 10.10 JSON_EQUALS() MDEV-23143 10.7 JSONPath enhancements MDEV-27911 MDEV-22224 10.9
  • 32. ● Concatenating strings with CONCAT() can lead to unreadable queries ○ Especially if you need to handle NULLs ● SFORMAT() enables more modern interpolation, based on the fmt library > SELECT SFORMAT('{} + {} = {}', 3, 5, (3 + 5)) AS str; +-----------+ | str | +-----------+ | 3 + 5 = 8 | +-----------+ SFORMAT()
  • 33. > SELECT SFORMAT('{2} - {1} = {0}', 3, 5, (3 + 5)) AS str; +-----------+ | str | +-----------+ | 8 - 5 = 3 | +-----------+ > SELECT SFORMAT('{:d}th son of a {:d}th son', 7, 7) AS iron_maiden; +----------------------+ | iron_maiden | +----------------------+ | 7th son of a 7th son | +----------------------+ SFORMAT()
  • 34. ● Strings are ordered alphabetically, according to a collation ● But some strings contain numbers or separators. In that case, the order decided by a collation alone is different than what humans expect: > SELECT ip FROM impression ORDER BY 1; +-----------------+ | ip | +-----------------+ | 100.120.122.200 | | 110.120.122.200 | | 80.222.120.200 | | 80.1.120.200 | +-----------------+ NATURAL_SORT_KEY()
  • 35. ● NATURAL_SORT_KEY() solves the problem by producing a modified version of the string that will be sorted correctly: > SELECT ip, NATURAL_SORT_KEY(ip) FROM impression ORDER BY 2; +-----------------+----------------------+ | ip | NATURAL_SORT_KEY(ip) | +-----------------+----------------------+ | 80.120.2.200 | 180.2120.02.2200 | | 99.120.122.200 | 199.2120.2122.2200 | | 100.120.122.200 | 2100.2120.2122.2200 | | 110.120.122.200 | 2110.2120.2122.2200 | +-----------------+----------------------+ NATURAL_SORT_KEY()
  • 36. ● In practice you don’t need to see that modified string: > SELECT ip FROM impression ORDER BY NATURAL_SORT_KEY(ip); +-----------------+ | ip | +-----------------+ | 80.120.2.200 | | 99.120.122.200 | | 100.120.122.200 | | 110.120.122.200 | +-----------------+ NATURAL_SORT_KEY()
  • 37. ● JSON_EQUALS() compares two JSON documents ignoring spaces, the keys order, etc ● Some functions accept JSONPath expressions to find a part of a JSON document. Now MariaDB JSONPath supports: ○ Array ranges SELECT JSON_EXTRACT(json_arr, '$[2 to 5]'); ○ Negative indexes SELECT JSON_EXTRACT(json_arr, '$[-1]'); JSON
  • 38. https://vettabase.com/services ● Migrations to/from MariaDB ● Upgrades (tests, no downtime) ● Database health checks ● Training for DBAs, devops, developers, data analysts ● And more MariaDB, MySQL, PostgreSQL, Cassandra All major cloud providers