mysql8 fordevelopers - percona · mysql 8 may be slower than mysql 5.7 on low powered systems and...
TRANSCRIPT
© 2018 Percona. 1
Peter Zaitsev, CEO, Percona
MySQL 8 for DevelopersLots of things to be looking forward to
December 12, 2018
Percona Technical Webinars
© 2018 Percona. 2
MySQL 8 – Adoption
Where do we stand ?
© 2018 Percona. 3
MySQL 8 News
Good News and Bad News
© 2018 Percona. 4
MySQL 8 Adoption by Wordpress Users
https://wordpress.org/about/stats/
© 2018 Percona. 5
MySQL 8 may be slower than MySQL 5.7 on low powered systems and at low concurrency
MySQL 8 Performance Regressions
0
200
400
600
800
1000
1200
1400
5.7.22 8.0.11
Transactions/sec TPCC 4 CPU Cores 128 Clients
© 2018 Percona. 6
Having Said that
Most Serious MySQL users are actively planning MySQL 8 migration
© 2018 Percona. 7
MySQL 8 Development Model
Excited to see new features are being released in Maintenance releases
More “Cloud Friendly” Development Model
Much higher requirements for Quality Assurance
© 2018 Percona. 8
Source Notes
Examples liberally borrowed from Oracle team presentations and Blog Posts
© 2018 Percona. 9
MySQL 8 for Devs
© 2018 Percona. 10
Much Better and Faster UTF8• utf8mb4 as Default Charset
© 2018 Percona. 11
Fast Information Schema
Scaling from 5.000 to 1.000.000 tables
© 2018 Percona. 12
Instant Add Column (8.0.13)
•ALTER TABLE t1 ADD COLUMN d INT DEFAULT 1000, ALGORITHM=INSTANT;
Add Column without
rebuilding table
© 2018 Percona. 13
Functions in DEFAULT (8.0.13)
CREATE TABLE t2 (a BINARY(16) DEFAULT uuid_to_bin(uuid()));
© 2018 Percona. 14
Functional Indexes (8.0.13)
CREATE INDEX idx1 ON t1 ((col1+col2));
© 2018 Percona. 15
Innodb NO WAIT and SKIP LOCKED
© 2018 Percona. 16
Descending Indexes
Descending flag in index definition is no more ignored
Allows efficient handling of ORDER BY A ASC, B DESC queries
© 2018 Percona. 17
Persistent Auto Increment
Another feature 10 years overdue
Do not reset AUTO INCREMENT to the max value in the table on restart
© 2018 Percona. 18
Partial In-Place Update for JSON
Can update field in JSON object without full re-write
Great for counters, statuses, timestamps etc
Only update and removal of element is supported
Full Support Added in Maintenance Releases
© 2018 Percona. 19
Better Optimizer
Many Optimizer improvements in MySQL 8
Your queries will run faster (or not)
© 2018 Percona. 20
Optimizer Histograms• Detailed Statistics on Columns, not just Indexes
© 2018 Percona. 21
Improved Optimizer Cost Model
Keep in account how much of data is cached vs
on disk
© 2018 Percona. 22
Optimizer HintsSet optimizer_switch settings for given query/tables
© 2018 Percona. 23
Invisible Indexes• Test impact of dropping indexes before actually dropping them• Can use use_invisible_indexes to use invisible indexes in a
session
© 2018 Percona. 24
Multibyte Safe Regular Expressions
Using Regexp with utf8 ?
© 2018 Percona. 25
Remote Management Features
RESTART (Command)
SET PERSIST innodb_buffer_pool_size = 1024 * 1024 * 1024;
© 2018 Percona. 26
Aggregation of Relational into JSON• JSON_ARRAYAGG() and JSON_OBJECTAGG()
© 2018 Percona. 27
JSON to Table Conversion
© 2018 Percona. 28
Better JSON Document Data Extraction
© 2018 Percona. 29
Common Table Expression• Recursive and Non-Recursive
© 2018 Percona. 30
Window Functions• Like GROUP BY, But Preserving Rows rather than collapsing
them
© 2018 Percona. 31
Much Better GIS• “Matching or Exceeding PostgreSQL GIS Feature Set”
© 2018 Percona. 32
A lot of new SQL Features
https://modern-sql.com/blog/2018-04/mysql-8.0
© 2018 Percona. 33
MySQL Document Store
Full Text Indexing
GeoJSON Support
© 2018 Percona. 34
New Authentication
Improved Security
Can cause problems with legacy drivers
mysql_native_password - workaround
© 2018 Percona. 35
Summary
Lots of Great new Features in MySQL 8 for Developers!
© 2018 Percona. 36
Want Something even better ?
Than MySQL 8
© 2018 Percona. 37
Percona Server for MySQL 8
Fully compatible with MySQL 8 Community
Alternatives for most of “MySQL Enterprise” features
100% Free and Open Source
MyRocks storage engine for modern workloads
Advanced Encryption Options
Shipping in next 30 days, Release Candidate Available
© 2018 Percona. 38
MySQL 8 for PMMMySQL 8 will allow us to make Percona Monitoring and Management even Better!
© 2018 Percona. 39
Percona Live
© 2018 Percona. 40
Thank You!