2. Kenny Gryp
Principal Product Manager
MySQL
Janurary 2020
Frédéric Descamps
Community Manager
MySQL
MySQL 8.0 a Giant Leap for SQL
MySQL 8 is Great !
2 / 80
3.
Safe Harbor
The following is intended to outline our general product direction. It is intended for information purpose only, and
may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality,
and should not be relied up in making purchasing decisions. The development, release, timing and pricing of any
features or functionality described for Oracle´s product may change and remains at the sole discretion of Oracle
Corporation.
Statement in this presentation relating to Oracle´s future plans, expectations, beliefs, intentions and ptospects
are "forward-looking statements" and are subject to material risks and uncertainties. A detailed discussion of
these factors and other risks that a ect our business is contained in Oracle´s Securities and Exchange
Commission (SEC) lings, including our most recent reports on Form 10-K and Form 10-Q under the heading
"Risk Factors". These lings are available on the SEC´s website or on Oracle´s website at
h p://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle
undertakes no duty to update any statement in light of new information or future events.
Copyright @ 2020 Oracle and/or its affiliates.
3 / 80
4. Who are we ?
Copyright @ 2020 Oracle and/or its affiliates.
4 / 80
5. Kenny Gryp
@gryp
MySQL Principal Product Manager
Replication, HA & InnoDB
raised in Belgium 🇧🇪
living in Oregon, USA 🇺🇸
Copyright @ 2020 Oracle and/or its affiliates.
5 / 80
9. DB-Engines 2019
Database Ranking
MySQL is the 2nd most popular database
MySQL is the most Open Source popular database
Copyright @ 2020 Oracle and/or its affiliates.
9 / 80
10. MySQL is the DBMS of the Year 2019 !
Copyright @ 2020 Oracle and/or its affiliates.
10 /
80
12. MySQL is the most popular database
with developers
MySQL Developer Popularity
Stack Overflow Developer Survey 2019
Copyright @ 2020 Oracle and/or its affiliates.
12 /
80
13. April 2018 (8.0 GA) August 2019
MySQL 8.0: fastest adoption of a release !!
Copyright @ 2020 Oracle and/or its affiliates.
13 /
80
14. "This is a landmark release as MySQL
eventually evolved beyond SQL-92 and the
purely relational dogma. Among a few other
standard SQL features, MySQL now
supports window functions (over) and
common table expressions (with). Without a
doubt, these are the two most important
post-SQL-92 features.”
MySQL 8.0: one giant leap for SQL
Copyright @ 2020 Oracle and/or its affiliates.
14 /
80
18. * CREATE
* READ
* UPDATE
* DELETE
col->add({title: 'MySQL is Great', author: 'lefred' })
col-> nd()
collection.modify('author = "lefred"').set('author',
'kenny')
col.remove('author = "lefred"')
MySQL supports JSON & CRUD operations
It's possible to use MySQL without a single line
of SQL !
Copyright @ 2020 Oracle and/or its affiliates.
18 /
80
19. MySQL supports JSON & CRUD operations
Copyright @ 2020 Oracle and/or its affiliates.
19 /
80
20. NoSQL + SQL =
MySQL
Copyright @ 2020 Oracle and/or its affiliates.
20 /
80
28. List the best restaurant of each type of
food and show the top 10, with the best
one first !
Copyright @ 2020 Oracle and/or its affiliates.
28 /
80
29. And all together !
Copyright @ 2020 Oracle and/or its affiliates.
29 /
80
30. And all together !
Copyright @ 2020 Oracle and/or its affiliates.
30 /
80
32. Modular
Easy to Extend
Each iterator encapsulates one operation
Same interface for all iterators
All operations can be connected
MySQL New Iterator Executor
Copyright @ 2020 Oracle and/or its affiliates.
32 /
80
33. Modular
Easy to Extend
Each iterator encapsulates one operation
Same interface for all iterators
All operations can be connected
MySQL New Iterator Executor
Copyright @ 2020 Oracle and/or its affiliates.
33 /
80
35. EXPLAIN ANALYZE
Instruments and executes the query
Estimated cost
Actual execution statistics
Time to return rst row
Time to return all rows
Number of rows returned
Number of loops
Uses the new tree output format also available in EXPLAIN
Copyright @ 2020 Oracle and/or its affiliates.
35 /
80
37. Hash Join
Typically faster than nested loop for large result sets
In-memory if possible
Spill to disk if necessary
Used for inner equi-joins
Extendable to outer, semi and anti joins
Replaces BNL in query plans
Hints to force use of hash join or nested loop
More Info: h ps://slideshare.net/NorvaldRyeng/mysql-8018-latest-updates-hash-join-
and-explain-analyze
Copyright @ 2020 Oracle and/or its affiliates.
37 /
80
40. MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
Copyright @ 2020 Oracle and/or its affiliates.
40 /
80
41. MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
Copyright @ 2020 Oracle and/or its affiliates.
41 /
80
42. Components:
MySQL Server
MySQL Group Replication
MySQL Shell
MySQL Router
MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
Copyright @ 2020 Oracle and/or its affiliates.
42 /
80
43. One Product: MySQL
All components developed together
Integration of all components
Full stack testing
MySQL InnoDB Cluster - Goals
Copyright @ 2020 Oracle and/or its affiliates.
43 /
80
44. One Product: MySQL
All components developed together
Integration of all components
Full stack testing
Easy to Use
One client: MySQL Shell
Integrated orchestration
Homogenous servers
MySQL InnoDB Cluster - Goals
Copyright @ 2020 Oracle and/or its affiliates.
44 /
80
46. High Available Distributed MySQL DB
Fault tolerance
Automatic failover
Active/Active update anywhere (limits
apply)
Automatic membership management
Adding/removing members
Network partitions, failures
Con ict detection and resolution
Prevents data loss
MySQL Group Replication
Copyright @ 2020 Oracle and/or its affiliates.
46 /
80
47. Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
MySQL Group Replication - Use Cases
Copyright @ 2020 Oracle and/or its affiliates.
47 /
80
48. Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
MySQL Group Replication - Use Cases
Copyright @ 2020 Oracle and/or its affiliates.
48 /
80
49. Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
Read Scaleout
Add/Remove members as needed
Replication Lag handling with Flow Control
Con gurable Consistency Levels
Eventual
Full Consistency -- no stale reads
MySQL Group Replication - Use Cases
Copyright @ 2020 Oracle and/or its affiliates.
49 /
80
50. Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
Read Scaleout
Add/Remove members as needed
Replication Lag handling with Flow Control
Con gurable Consistency Levels
Eventual
Full Consistency -- no stale reads
Active/Active environments
Write to many members at the same time
ordered writes within the group (XCOM)
guaranteed consistency
Good write performance
due to Optimistic Locking
(workload dependent)
MySQL Group Replication - Use Cases
Copyright @ 2020 Oracle and/or its affiliates.
50 /
80
52. Transparent Access to Database Arch.
"provide transparent routing between your application and
back-end MySQL Servers"
Transparent client connection routing
Load balancing
Application connection failover
Li le to no con guration needed
Stateless design o ers easy HA client routing
Router as part of the application stack
Integration into InnoDB Cluster & InnoDB ReplicaSet
Understands Group Replication & Replication
topology
Currently TCP Port each for PRIMARY and NON-
PRIMARY tra c
MySQL Router
Copyright @ 2020 Oracle and/or its affiliates.
52 /
80
54. Database Administration Interface
"MySQL Shell provides the developer and DBA with a single
intuitive, exible, and powerful interface for all MySQL
related tasks!"
Multi-Language: JavaScript, Python, and SQL
Naturally scriptable
Supports Document and Relational models
Exposes full Development and Admin API
Classic MySQL protocol and X protocol
MySQL Shell
Copyright @ 2020 Oracle and/or its affiliates.
54 /
80
55. Introducing MySQL InnoDB ReplicaSet!
8.0.19 Feature!
Fully integrated MySQL Router
Automatic Routing
Ease of use with MySQL Shell
Con guring, Adding, Removing members
Automatic Member Provisioning (CLONE)
MySQL InnoDB Replicaset
Copyright @ 2020 Oracle and/or its affiliates.
55 /
80
56. Replication Architecture:
(manual) Switchover & Failover
(asynchronous) Read Scaleout
'Simple' Replication architecture:
no network/hardware requirements
Providing Availability on PRIMARY when
issues with secondaries or network
MySQL InnoDB Replicaset
Copyright @ 2020 Oracle and/or its affiliates.
56 /
80
57. Past MySQL InnoDB ReplicaSet
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
57 /
80
58. Past MySQL InnoDB ReplicaSet
Restore a backup to provision a member Automatically provisioning new members:
InnoDB CLONE
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
58 /
80
59. Past MySQL InnoDB ReplicaSet
Restore a backup to provision a member Automatically provisioning new members:
InnoDB CLONECon gure Replication Users
Con gure Replication MySQL Shell Automatically con gures users &
replication
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
59 /
80
60. Past MySQL InnoDB ReplicaSet
Restore a backup to provision a member Automatically provisioning new members:
InnoDB CLONECon gure Replication Users
Con gure Replication MySQL Shell Automatically con gures users &
replicationManually con guring, adding removing servers in
Application, MySQL Router (or other proxy) Integrated MySQL Router load balancing
Only need to bootstrap Router
Router is stateless, adapts to topology changes
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
60 /
80
61. Past MySQL InnoDB ReplicaSet
Restore a backup to provision a member Automatically provisioning new members:
InnoDB CLONECon gure Replication Users
Con gure Replication MySQL Shell Automatically con gures users &
replicationManually con guring, adding removing servers in
Application, MySQL Router (or other proxy) Integrated MySQL Router load balancing
Only need to bootstrap Router
Router is stateless, adapts to topology changes
Manually or relying on external tools to make topology
changes
Easy to use manual switchover/failover
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
61 /
80
62. Past MySQL InnoDB ReplicaSet
Restore a backup to provision a member Automatically provisioning new members:
InnoDB CLONECon gure Replication Users
Con gure Replication MySQL Shell Automatically con gures users &
replicationManually con guring, adding removing servers in
Application, MySQL Router (or other proxy) Integrated MySQL Router load balancing
Only need to bootstrap Router
Router is stateless, adapts to topology changes
Manually or relying on external tools to make topology
changes
Easy to use manual switchover/failoverUse additional monitoring tool log in on all machines
to check topology status See status of the topology through MySQL Shell
status()
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
62 /
80
63. Past MySQL InnoDB ReplicaSet
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
63 /
80
64. Past MySQL InnoDB ReplicaSet
complexity: user is responsible for the full
con guration of every component and it's se ings
Shell con gures Server, Router, Replication in a
standardized best practice setup, prevents mistakes
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
64 /
80
65. Past MySQL InnoDB ReplicaSet
complexity: user is responsible for the full
con guration of every component and it's se ings
Shell con gures Server, Router, Replication in a
standardized best practice setup, prevents mistakes
every setup is a customized setup Standard Solution -- Supported & QA'ed by Oracle
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
65 /
80
66. Past MySQL InnoDB ReplicaSet
complexity: user is responsible for the full
con guration of every component and it's se ings
Shell con gures Server, Router, Replication in a
standardized best practice setup, prevents mistakes
every setup is a customized setup Standard Solution -- Supported & QA'ed by Oracle
A lot of manual steps and additional software
required, always customized and often
overengineered by MySQL DBA's
Easy to use, even for MySQL beginner
MySQL InnoDB ReplicaSet - Features
Copyright @ 2020 Oracle and/or its affiliates.
66 /
80
67. MySQL Shell - Easy to Use
Copyright @ 2020 Oracle and/or its affiliates.
67 /
80
68. MySQL InnoDB Cluster MySQL InnoDB ReplicaSet
js> c admin@mysql1
js> cluster = dba.createCluster('cluster')
js> c admin@mysql1
js> rs = dba.createReplicaSet('replicaset')
MySQL Shell - Easy to Use
Copyright @ 2020 Oracle and/or its affiliates.
68 /
80
69. MySQL InnoDB Cluster MySQL InnoDB ReplicaSet
js> c admin@mysql1
js> cluster = dba.createCluster('cluster')
js> c admin@mysql1
js> rs = dba.createReplicaSet('replicaset')
Con gure server to add later
js> dba.con gureInstance('admin@mysql2') js> dba.con gureReplicaSetInstance('admin@mysql2')
MySQL Shell - Easy to Use
Copyright @ 2020 Oracle and/or its affiliates.
69 /
80
70. MySQL InnoDB Cluster MySQL InnoDB ReplicaSet
js> c admin@mysql1
js> cluster = dba.createCluster('cluster')
js> c admin@mysql1
js> rs = dba.createReplicaSet('replicaset')
Con gure server to add later
js> dba.con gureInstance('admin@mysql2') js> dba.con gureReplicaSetInstance('admin@mysql2')
Add server to the Cluster
js> cluster.addInstance('admin@mysql2') js> rs.addInstance('admin@mysql2')
MySQL Shell - Easy to Use
Copyright @ 2020 Oracle and/or its affiliates.
70 /
80
71. MySQL InnoDB Cluster MySQL InnoDB ReplicaSet
js> c admin@mysql1
js> cluster = dba.createCluster('cluster')
js> c admin@mysql1
js> rs = dba.createReplicaSet('replicaset')
Con gure server to add later
js> dba.con gureInstance('admin@mysql2') js> dba.con gureReplicaSetInstance('admin@mysql2')
Add server to the Cluster
js> cluster.addInstance('admin@mysql2') js> rs.addInstance('admin@mysql2')
Bootstrap MySQL Router
$ sudo mysqlrouter --user=mysqlrouter --bootstrap
$ sudo systemctl start mysqlrouter
$ sudo mysqlrouter --user=mysqlrouter --bootstrap
$ sudo systemctl start mysqlrouter
MySQL Shell - Easy to Use
Copyright @ 2020 Oracle and/or its affiliates.
71 /
80
72. mysql-js> cluster.status()
{
"clusterName": "cluster",
"defaultReplicaSet": {
"name": "default",
"primary": "mysql1:3306",
"ssl": "REQUIRED",
"status": "OK",
"statusText": "Cluster is ONLINE and can
tolerate up to ONE failure.",
"topology": {
"mysql1:3306": {
"address": "mysql1:3306",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
},
"mysql2:3306": {
"address": "mysql2:3306",
"mode": "R/O",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
},
"mysql3:3306": {
"address": "mysql3:3306",
"mode": "R/O",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
}
}
}
MySQL Shell - Easy to Use
Check the Cluster status:
Copyright @ 2020 Oracle and/or its affiliates.
72 /
80
76. Don't forget to use MySQL Shell Upgrade
Checker Utility
New tool in MySQL Shell
JS> util.checkForServerUpgrade()
Will check your MySQL 5.7 or 8.0 installation readiness for upgrade to latest version
Check for legacy issues
Run the tool on the 5.7 before upgrading!
Copyright @ 2020 Oracle and/or its affiliates.
76 /
80
78. Upgrade to MySQL 8.0
It's time to upgrade to
MySQL 8.0, the fastest MySQL
adoption release ever !
Copyright @ 2020 Oracle and/or its affiliates.
78 /
80
79. Upgrade to MySQL 8.0
It's time to upgrade to
MySQL 8.0, the fastest MySQL
adoption release ever !
Copyright @ 2020 Oracle and/or its affiliates.
79 /
80