Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
What's New in MySQL 8.0NoSQL + SQL = MySQL
Geir Hoydalsvik, MySQL Engineering
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purposes 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 upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Innovation: 5.7 -> 8.0
- 3x Better Performance- Replication Enhancements- Optimizer Cost Model- JSON Support- Improved Security- Sys & Performance Schema- GIS
MySQL 5.7
MySQL InnoDB Cluster- MySQL Group Replication- MySQL Router- MySQL Shell
MySQL 8.0- 2x Better Performance- NoSQL Document Store- JSON- CTEs- Window Functions- Data Dictionary- InnoDB Redo Log- Instant Add Column- Replication- Roles- Unicode
2 Years in Development400+ Worklogs5000+ Bugs Fixed500 New Tests
GA
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL NDB Cluster 8.0
- MySQL Server 5.7- 5x faster restarts- JSON Support- 50% faster reads- 40% faster read/write
NDB 7.5
NDB 7.6- MySQL Server 5.7- Redesigned for many Terabyte- Redesigned for modern hardware- 50% faster joins- 100% faster scans- Another 10x faster restarts
NDB 8.0- Adopting data dictionary- Thousands of nodes- 3 - 4 replicas- Larger rows
DMR
Download and test NDB 8.0.13 nowhttps://dev.mysql.com/downloads/cluster/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Open Source & MySQL Community
• Product alignment in 8.0
• Continious Delivery Model
• NoSQL + SQL = MySQL
• Document Store, NoSQL
• Developer productivity, SQL, JSON, GIS
• Developer experience, MySQL Shell
• HA “out of the box”, InnoDB Cluster
• DevOps productivity
5
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 6
MySQL 8.0: Document Store
• Document oriented data storage for MySQL
– Full JSON document support through SQL and new X DevAPI NoSQL interface
• Schema-less and schema based data in the same technology stack
– Use COLLECTIONs of documents & relational TABLEs together
• Rapid Prototyping & Simple CRUD APIs
– Modern APIs using “method chaining” and asynchronous execution (e.g. promises, callbacks, etc.)
• Connectors for many different languages and frameworks
– Node.JS, Java, NET, C++/C, PHP, Python
NoSQL + SQL = MySQL
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
• Full Node.js integration
– Support for “Promises”
• Autocompletion support in IDEs
– Due to method chaining support
• Intuitive Documentation & Tutorials
– Example:
7
MySQL 8.0: Document StoreDesigned for modern Developers
COLLECTION.add Function
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0: One Giant Leap for SQL
“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.”
https://modern-sql.com/blog/2018-04/mysql-8.0
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0.13: Functional Indexes
• Index over an expression
CREATE TABLE t1 (col1 INT, col2 INT, INDEX func_index ((ABS(col1))));
CREATE INDEX idx1 ON t1 ((col1 + col2));
CREATE INDEX idx2 ON t1 ((col1 + col2), (col1 - col2), col1);
ALTER TABLE t1 ADD INDEX ((col1 * 40));
• No longer necessary to create an indexed generated column
– Behaves like indexed virtual column
• Not allowed as PRIMARY KEY
Confidential – Oracle Internal/Restricted/Highly Restricted 9
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0.13: Expressions as Default Values
• No longer limited to literal values
CREATE TABLE t1 (uuid BINARY DEFAULT (UUID_TO_BIN(UUID())));
CREATE TABLE t2 (a INT, b INT, c INT DEFAULT (a+b));
CREATE TABLE t3 (a INT, b INT, c POINT DEFAULT (POINT(0,0)));
CREATE TABLE t4 (a INT, b INT, c JSON DEFAULT (‘[]’));
• Useful for types without literal values
– GEOMETRY, POINT, LINESTRING, POLYGON, ...
• Similar to stored generated column, but modifiable
Confidential – Oracle Internal/Restricted/Highly Restricted 10
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0.11: JSON_TABLE()From JSON Document to SQL Table
mysql> SELECT emps.* FROM JSON_TABLE(@jsonempl,
"$[*]" COLUMNS (id INT PATH "$.id", name VARCHAR(45)
PATH "$.name", age INT PATH "$.age")) emps;
+------+------+------+
| id | name | age |
+------+------+------+
| 1 | John | 34 |
| 2 | Mary | 40 |
| 3 | Mike | 44 |
+------+------+------+
3 rows in set (0,00 sec)
11
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Simple
– Completely built in and ready to use
– No extra configuration or Installation
• Powerful
– Full Geography Support
• Projected – Flat/Across 2 dimensions
• Geographic – Spheroid
– Details -
• 5151 predefined SRSs from the EPSG Dataset 9.3
– 4668 projected
– 483 geographic
MySQL 8.0: GIS
12
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 13
Get started in minutesMySQL 8.0: Shell
• Rapid prototyping capabilities
– Using JavaScript and Python
• Full SQL and X DevAPI support
– With built in auto-completion
• InnoDB Cluster support
– Setup your HA solution within minutes
• DevOps Tool
– Designed for DevOps operations
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
InnoDB Cluster
14
App Servers withMySQL Router
MySQL Group Replication
MySQL ShellSetup, Manage,
Orchestrate
“High Availability becomes a corefirst class feature of MySQL!”
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Group Replication
• The number of servers has to grow or shrink dynamically
• Hide complexity from the application
• Reconfigure upon failure
• Fast provisioning, clone
• Join & Leave
• Elect primary
• Online
• Notification
Wdnesday, 24th Oct 2018, San Francisco, CA, USA Oracle Open World 2018
A B C D E
15
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 for DevOps
• Online, dynamic config changes, instant add column
• Performance, Efficiency, Scale
• Reliability, Transactional Data Dictionary
• Monitoring, IS & PS
• Management, Shell, Set Persist
• Security–Users, credentials, privileges, encrypting data over the wire and at rest
16
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0: Upgrade Checker
17
• Quick and Easy MySQL Shell Utility
– JavaScript
– Python
• Identifies Issues Based on Severity
– No Issues
– Potential Errors
– Errors that must be fixed before Upgrading
• Recommends Fixes – Schema, Configuration
– Data on Server, etc.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
What do YOU want from the Shell?Talk to us....
Thank you for using MySQL !