mysql8 fordevelopers - percona · mysql 8 may be slower than mysql 5.7 on low powered systems and...

40
© 2018 Percona. 1 Peter Zaitsev, CEO, Percona MySQL 8 for Developers Lots of things to be looking forward to December 12, 2018 Percona Technical Webinars

Upload: others

Post on 28-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 1

Peter Zaitsev, CEO, Percona

MySQL 8 for DevelopersLots of things to be looking forward to

December 12, 2018

Percona Technical Webinars

Page 2: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 2

MySQL 8 – Adoption

Where do we stand ?

Page 3: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 3

MySQL 8 News

Good News and Bad News

Page 4: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 4

MySQL 8 Adoption by Wordpress Users

https://wordpress.org/about/stats/

Page 5: MySQL8 forDevelopers - Percona · 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

© 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

Page 6: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 6

Having Said that

Most Serious MySQL users are actively planning MySQL 8 migration

Page 7: MySQL8 forDevelopers - Percona · 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

© 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

Page 8: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 8

Source Notes

Examples liberally borrowed from Oracle team presentations and Blog Posts

Page 9: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 9

MySQL 8 for Devs

Page 10: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 10

Much Better and Faster UTF8• utf8mb4 as Default Charset

Page 11: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 11

Fast Information Schema

Scaling from 5.000 to 1.000.000 tables

Page 12: MySQL8 forDevelopers - Percona · 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

© 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

Page 13: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 13

Functions in DEFAULT (8.0.13)

CREATE TABLE t2 (a BINARY(16) DEFAULT uuid_to_bin(uuid()));

Page 14: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 14

Functional Indexes (8.0.13)

CREATE INDEX idx1 ON t1 ((col1+col2));

Page 15: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 15

Innodb NO WAIT and SKIP LOCKED

Page 16: MySQL8 forDevelopers - Percona · 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

© 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

Page 17: MySQL8 forDevelopers - Percona · 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

© 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

Page 18: MySQL8 forDevelopers - Percona · 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

© 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

Page 19: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 19

Better Optimizer

Many Optimizer improvements in MySQL 8

Your queries will run faster (or not)

Page 20: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 20

Optimizer Histograms• Detailed Statistics on Columns, not just Indexes

Page 21: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 21

Improved Optimizer Cost Model

Keep in account how much of data is cached vs

on disk

Page 22: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 22

Optimizer HintsSet optimizer_switch settings for given query/tables

Page 23: MySQL8 forDevelopers - Percona · 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

© 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

Page 24: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 24

Multibyte Safe Regular Expressions

Using Regexp with utf8 ?

Page 25: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 25

Remote Management Features

RESTART (Command)

SET PERSIST innodb_buffer_pool_size = 1024 * 1024 * 1024;

Page 26: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 26

Aggregation of Relational into JSON• JSON_ARRAYAGG() and JSON_OBJECTAGG()

Page 27: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 27

JSON to Table Conversion

Page 28: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 28

Better JSON Document Data Extraction

Page 29: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 29

Common Table Expression• Recursive and Non-Recursive

Page 30: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 30

Window Functions• Like GROUP BY, But Preserving Rows rather than collapsing

them

Page 31: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 31

Much Better GIS• “Matching or Exceeding PostgreSQL GIS Feature Set”

Page 32: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 32

A lot of new SQL Features

https://modern-sql.com/blog/2018-04/mysql-8.0

Page 33: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 33

MySQL Document Store

Full Text Indexing

GeoJSON Support

Page 34: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 34

New Authentication

Improved Security

Can cause problems with legacy drivers

mysql_native_password - workaround

Page 35: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 35

Summary

Lots of Great new Features in MySQL 8 for Developers!

Page 36: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 36

Want Something even better ?

Than MySQL 8

Page 37: MySQL8 forDevelopers - Percona · 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

© 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

Page 38: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 38

MySQL 8 for PMMMySQL 8 will allow us to make Percona Monitoring and Management even Better!

Page 39: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 39

Percona Live

Page 40: MySQL8 forDevelopers - Percona · 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

© 2018 Percona. 40

Thank You!