45
© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’re excited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL Day

Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 1

Peter Zaitsev, CEO, Percona

Why we’re excited about MySQL 8 Practical Look for Devs and Ops

February 2nd, 2018

Pre FOSDEM MySQL Day

Page 2: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 2

In the Presentation

Practical view on MySQL 8

Exciting things for Devs

Exciting things for Ops

Page 3: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 3

Warning

This assessment is done for Pre-GA MySQL 8, based on documentation and limited testing. We’re yet to see how they behave in production

Page 4: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 4

Source Notes

Examples liberally borrowed from Oracle team presentations and Blog Posts

Page 5: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 5

MySQL 8 for Ops

Page 6: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 6

Ops care about

Stability

High Availability

Performance

Security

Observability

Manageability

Page 7: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 7

Native Data Dictionary

About 10 years overdue

Atomic, Crash Save, DDLs

Much Faster Information Schema

No more MyISAM System Tables!

Page 8: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 8

Fast Information Schema

Scaling from 5.000 to 1.000.000 tables

Page 9: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 9

Much Better and Faster UTF8

• utf8mb4 as Default Charset

Page 10: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 10

Security

ROLEs

Breakdown of SUPER Privileges

Password History

Faster cached-SHA2 Authentication (Default)

Community Builds use OpenSSL

--skip-grants blocks remote connections

Redo and Undo Logs are now encrypted if Table Encryption is enabled

Page 11: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 11

Persistent Auto Increment

Another feature 10 years overdue

Do not reset AUTO INCREMENT to the max value in the table on restart

Page 12: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 12

Auto-Managed Undo Tablespace

Do not use system table space for undo space any more

Automatically reclaim space on disk from large transactions

Page 13: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 13

Self Tuning (limited to Innodb)

•innodb_buffer_pool_size

•innodb_log_file_size

•innodb_flush_method

Set innodb_dedicated_server

to auto-tune

Page 14: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 14

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

Innodb Support Added as of MySQL 8.0.4

Page 15: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 15

Invisible Indexes

• Test impact of dropping indexes before actually dropping them

• Can use use_invisible_indexes to use invisible indexes in a session

Page 16: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 16

TmpTable Storage Engine

More efficient storage engine for Internal Temporary tables

Efficient storage for VARCHAR and VARBINARY columns

BLOB/TEXT Columns are not supported (yet?)

Page 17: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 17

Backup Locks

Prevent operation which may result in inconsistent backups

LOCK INSTANCE FOR BACKUP

Page 18: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 18

Optimizer Histograms

• Detailed Statistics on Columns, not just Indexes

Page 19: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 19

Improved Optimizer Cost Model

Keep in account how much of data is cached vs

on disk

http://bit.ly/2CZu6z6

Page 20: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 20

More on MySQL 8 Optimizer

http://www.unofficialmysqlguide.com/

Page 21: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 21

Performance Schema

(Fake) Indexes for Faster Access

Error Instrumentation

Response Time Histograms (Global and Per Query Digest)

Query Examples for Summary by Digest

Page 22: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 22

Performance Schema Performance

• Now is Interactively Usable at Scale

Page 23: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 23

Remote Management Features

RESTART (Command)

SET PERSIST innodb_buffer_pool_size = 1024 * 1024 * 1024;

Page 24: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 24

Assumes storage is SSD by Default

Start of the long journey

Page 25: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 25

Binary Log On by Default

bin_log is enabled by default

log_slave_updates is enabled by default

Expire logs after 30 days by default

Page 26: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 26

Query Cache Removed

It’s design caused more problems than it fixed

Use ProxySQL (or other) external query cache instead

Page 27: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 27

Native Partitioning Only

Only “Native” Partitioning supported, not Generic One

Remove partitions from MyISAM partitioned tables or convert them

ALTER TABLE ... REMOVE PARTITIONING

ALTER TABLE ... ENGINE=INNODB

Page 28: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 28

Resource Groups

• Isolation and Better Performance

Page 29: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 29

Plain Better Performance at Scale

Page 30: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 30

MySQL 8 for PMM

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

Page 31: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 31

Feature Requests

Better Single Thread Performance

Parallel Single Query Processing Please

Page 32: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 32

Sorry state of MySQL single thread performance

http://bit.ly/2oMvu2a

Page 33: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 33

MySQL 8 for Devs

Page 34: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 34

Innodb NO WAIT and SKIP LOCKED

Page 35: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 35

Descending Indexes

Descending flag in index definition is no more ignored

Allows efficient handling of ORDER BY A ASC, B DESC queries

Page 36: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 36

Aggregation of Relational into JSON

• JSON_ARRAYAGG() and JSON_OBJECTAGG()

Page 37: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 37

JSON to Table Conversion (Labs)

Page 38: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 38

Better JSON Document Data Extraction

Page 39: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 39

Common Table Expression

• Recursive and Non-Recursive

Page 40: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 40

Window Functions

• Like GROUP BY, But Preserving Rows rather than collapsing them

Page 41: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 41

Much Better GIS

• “Matching or Exceeding PostgreSQL GIS Feature Set”

Page 42: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 42

MySQL Document Store

Full Text Indexing

GeoJSON Support

Anyone Using Document Store ?

Page 43: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 43

Summary

MySQL 8 looks like release to be excited about

Has a lot of new features both for Devs and Ops

Page 44: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 44

SAVE THE DATE!

www.perconalive.com

April 23-25, 2018Santa Clara Convention Center

Page 45: Why we’re excited about MySQL 8...© 2018 Percona. 1 Peter Zaitsev, CEO, Percona Why we’reexcited about MySQL 8 Practical Look for Devs and Ops February 2nd, 2018 Pre FOSDEM MySQL

© 2018 Percona. 45

Thank You!