mysql day paris 2016 - state of the dolphin
TRANSCRIPT
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
State of the Dolphin
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Olivier DasiniMySQL Principal Solutions Architect [email protected]@freshdaz
Copyright © 2016, 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 © 2016, Oracle and/or its affiliates. All rights reserved. | 3
MySQL usage still on the rise
MySQL Recap
• 21 Years OldMySQL has been part of Oracle’s family of databases for six years.
• Doing very well at Oracle
Hiring
Profitable
• MySQL 8MySQL 5.7 is the current release but the next version will be MySQL 8. Big feature is real time data dictionary.
• Document StoreProgrammers not know SQL but need a database? X Devapi allows them to use RDMS from language of choice #nosql.
• Group ReplicationActive master-master replication.
• JSONA new native JSON datatype to store documents in a column of a table.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
A Modern Database for the Digital AgeDigital Disruptors & Large Enterprises Rely on MySQL to Innovate
4
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
They Scale
with MySQL
Mobile Network Supporting Over 800 Million Subscribers
1.7 Billion Active Users100 TB of User Data for PayPal
IDs Processed for 1 Billion Citizens
850 Million Candy Crush Game Plays/Day
2 Billion Events/Day for Booking.com
5
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 – Improvements across the board
• Replication
• InnoDB
• Optimizer
• Security
• Performance Schema
• GIS
• Triggers
• Partitioning
• New! SYS Schema
• New! JSON
• Performance
6
150+ new
features
In total!
http://www.thecompletelistoffeatures.com/
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0.0. DMR 1
7
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0.0 DMR 1
• The next version of MySQL will be 8.0– MySQL 6 is a canceled version (2007)– MySQL Cluster 7 exists– 5.7 → 8.0 is a “nice” jump (“Just drop the 5.”)
• First Development Milestone Release available– A DMR is produced from TRUNK every 3-6 months – Includes everything that is new in TRUNK since the previous DMR. – The goal is to produce DMRs with RC (release candidate) quality.
8
https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 9
The character set for the Web
MySQL 8.0: UTF-8
• New! Support for the latest Unicode 9.0
• Per-country collation rules– Accent Sensitive
– Case Sensitive
• Based on UCA DUCET
• UTF8MB4 as the default character set– Project started in MySQL 5.7
– Many improvements to reduce performance impact
• UTF-8 is the dominating character set in today’s applications
• CJK users are adopting UTF-8– Driven by “adopted words” from
foreign languages
• EN users are adopting UTF-8– Driven by support for emojis
https://en.wikipedia.org/wiki/UTF-8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 10
MySQL 8.0
Continuing the JSON Experience
• MySQL Document Store
• Administer MySQL via the MySQL Shell
• New JSON functions– JSON_ARRAYAGG()
– JSON_OBJECTAGG()
SELECT blog.*, JSON_ARRAYAGG( JSON_OBJECT("author", blog_comment.author, "body", blog_comment.body) ) AS commentsFROM blogJOIN blog_comment ON blog.id = blog_comment.blog_idGROUP BY blog_id;+++++| 1 | Hello World | This is my new Blog! | [{"body": "Great blog!", "author": "A Friend"}, {"body": "Great new blog", "author": "Best Friend"}] |+++++| 2 | spam trap | spam goes here | [{"body": "Buy these pills to enlarge your blog", "author": "Visitor"}]+++++
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 12
MySQL 8.0: Invisible Indexes
• Indexes are “hidden” to the MySQL Optimizer– Not the same as “disabled indexes”
– Contents are fully up to date and maintained by DML
• Two use cases:– Soft Delete (Recycle Bin)
– Staged Rollout
Feature Requestfrom DBAs
• I don’t think this index is used any more:ALTER TABLE Country ALTER INDEX c INVISIBLE;
• I need to revert:ALTER TABLE Country ALTER INDEX c VISIBLE;
• It is now safe to drop:ALTER TABLE Country DROP INDEX c;
Example Usage:
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 16
MySQL 8.0: Persist Configuration
• Persist GLOBAL Dynamic Server Variables– SET PERSIST sql_mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';
• Examples Include:– SQL Mode
– Offline Mode
– Read Only
• Requires no filesystem access
Cloud Friendly
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 19
MySQL 8.0: Transactional Data Dictionary
• Increased Reliability• Using InnoDB internally for data dictionary
– No FRM files
– No DB.OPT files
– No TRG files
– No TRN files
– No PAR files
• MySQL 8.0 default install no longer contains MyISAM tables.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 20
Additional Benefits
MySQL 8.0: Transactional Data Dictionary
• Better cross-platform experience– No dependencies on filesystem semantics
• Atomic DDL– Better Replication
– Simplifies server edge cases
• Flexible Metadata API– Easier path to adding new features
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• UUID improvements
– Functions to convert UUID to and from binary
– Smaller and insert-order efficient
• InnoDB Auto Increment Persists
• Common Table Expressions
• Privilege Tables now 100% InnoDB
• Security Roles
• Improved Scan Query Performance
• Improved BLOB Storage
• Improved Memcached Interface
• Improved Information Schema Performance
• Performance Schema Indexes
• Improved Sys Schema Performance
• Scalability Improvements
• Parser Refactoring
• Document Store
• Improvements to Temporary Tables
• C++11 and Toolchain Improvements
• Replication Applier Thread Progress Reports
• GTID_PURGED always settable
• Improved cost model
• Source code documented with Doxygen
• Expanded GIS Support
• Expanded Query Hints Support
• Plugin Infrastructure!
23
MySQL 8.0: All these features and more…
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication
24
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication“Multi-master update anywhere replication plugin for MySQL with
built-in conflict detection and resolution, automatic distributed recovery, and group membership.”
• Active/Active update anywhere • Distributed fault tolerance• Automatic server fail-over• Automatic reconfiguration • Automatic conflict detection & resolution
25
App Servers withMySQL Router
MySQL Group Replication
MySQL ShellSetup, Manage,
Orchestrate
RC
http://dasini.net/blog/2016/11/08/deployer-un-cluster-mysql-group-replication/
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: Architecture
Node TypesR: Traffic routers/proxies: mysqlrouter, haproxy, sqlproxy, ...
M: mysqld nodes participating in Group Replication
26
RC
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 27
Scale-OutHigh Performance
Ease-of-UseBuilt-in HA
Out-of-Box SolutionEverything Integrated
MySQLInnoDB
cluster
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 28
A single product: MySQL• All components created together
• Tested together
• Packaged together
Flexible and Modern• C++ 11
• Protocol Buffers
• Developer friendly
MySQL InnoDB Cluster – Goals
Easy to use • A single client: MySQL Shell
• Easy packaging
• Homogenous servers
Scale-out• Sharded clusters
• Federated system of N replica sets
• Each replica set manages a shard
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL
InnoDBcluster
MySQL InnoDB Cluster – Architecture - S2
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
Group Replication
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster 7.5
35
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36
MySQL Cluster 7.5
• Read Optimized Tables• Global Tables
Capacity and Scale Out
• MySQL 5.7• JSON Data Type• Generated Columns• Records-Per-Key
Optimization
Improved SQL
• Improved Reporting• Improved Logging• Improved Visibility • Improved Debugging• Improved Restore
Management
GA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle MySQL Cloud Service
37
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
NEW! Oracle MySQL Cloud ServiceSimple, Automated, Integrated & Enterprise-Ready
• The #1 Open Source Database in Oracle Cloud
• Only public cloud integrating MySQL Enterprise Edition
• Rapidly, securely and cost-effectively develop & deploy modern MySQL-based applications
38
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Highest Levels of Security Scalability & Availability Expert MySQL
Technical Support
Integration into Oracle Cloud Environment
Hybrid deployments across cloud & on-premises Lower TCO
39
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4040
Oracle MySQL Cloud Service: Product Overview
* Will be available in future releases
PaaS
Compute
Oracle Premier Support
Compute, Storage, Network
MySQL Enterprise Edition
Database Administration
Database Administration
Automated ProvisioningAutomated Provisioning
Push Button Patching
Push Button Patching
1-Click Instance
Management
1-Click Instance
Management
Enterprise MonitoringEnterprise Monitoring
Backup & RecoveryBackup & Recovery
Automated Backup
Automated Backup
Point-in-time Recovery
Point-in-time Recovery
On-demand Snapshot
On-demand Snapshot
ScalabilityScalability
Elastic Compute
Elastic Compute
Elastic StorageElastic Storage
Enterprise Thread PoolEnterprise
Thread Pool
Elastic Replication*
Elastic Replication*
High Availability
High Availability
ReplicationReplication
Replication Monitor
Replication Monitor
Multi-AD Support*Multi-AD Support*
SecuritySecurity
Network Access Control
Network Access Control
Enterprise Firewall
Enterprise Firewall
Enterprise Authentication
Enterprise Authentication
Enterprise Encryption & TDE*
Enterprise Encryption & TDE*
Enterprise Audit
Enterprise Audit
Management Access
DataAccess
CLI
REST API
Oracle Cloud Console
MySQL Tools
On-premiseApplications
40
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 41
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 42
LinksRecap
• http://dasini.net/blog/2016/10/05/mysql-a-oracle-openworld-2016/
MySQL 8
• http://mysqlserverteam.com/the-mysql-8-0-0-milestone-release-is-available/
• http://mysqlserverteam.com/mysql-8-0-persisting-configuration-variables/
• http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes/
• http://mysqlserverteam.com/mysql-8-0-invisible-indexes/
• http://mysqlserverteam.com/mysql-8-0-faster-batch-record-retrieval/
• http://mysqlserverteam.com/mysql-8-0-labs-json-aggregation-functions/
MySQL Group Replication / InnoDB Cluster
• http://mysqlhighavailability.com/mysql-group-replication-a-quick-start-guide/
• http://mysqlhighavailability.com/gr/doc/
• https://www.youtube.com/watch?v=JWy7ZLXxtZ4
Oracle MySQL Cloud Service
• https://www.youtube.com/watch?v=xXUlHvAYtiE
• http://www.slideshare.net/morgo/mysql-cloud-service-deep-dive
OOW
• https://www.youtube.com/watch?v=SmCxsphWoWQ
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Thank you!