SlideShare une entreprise Scribd logo
1  sur  75
Télécharger pour lire hors ligne
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Olivier Dasini
MySQL Principal Solutions Architect EMEA
olivier.dasini@oracle.com
Twitter : @freshdaz
Blog : http://dasini.net/blog
What’s New in MySQL 8.0 ?
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.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Agenda
Introduction
MySQL 8.0 Features for Developers
MySQL 8.0 Features for DBAs
1
2
3
3
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Me, Myself & I

MySQL Geek
 Addicted to MySQL for 15+ years!
 Playing with databases for 20+ years

MySQL Writer, Blogger and Speaker
 Also former : DBA, Consultant, Architect, Trainer, ...

MySQL Principal Solutions Architect EMEA at Oracle

Stay tuned! :
 Twitter: @freshdaz
 Blog: http://dasini.net/blog
4
Olivier DASINI
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The world's most popular open source database
5
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Stack Overflow Developer Survey 2018
Developer Survey Results
MySQL is the most popular database
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
JetBrains Survey 2018
The State of Developer Ecosystem
MySQL is the most popular database
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Powers Social
8
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Powers eCommerce
9
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Powers SaaS
10
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Powers Finance
11
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Powers the Cloud
12
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Continuous Innovation: 5.7 -> 8.0
13
- 3x Better Performance
- Replication Enhancements
- Optimizer Cost Model
- JSON Support
- Improved Security
- Sys & Performance Schema
- GIS
MySQL 5.7 (GA)
MySQL InnoDB Cluster (GA)
- MySQL Group Replication
- MySQL Router
- MySQL Shell
MySQL 8.0 (GA)
- NoSQL Document Store
- JSON
- New Data Dictionary
- Roles
- Unicode
- CTEs
- Window Functions
- Improved Security
- Improved Replication
- Improved GIS
- Histograms
- Resource Group
- ...
2 Years in Development
400+ Worklogs
5000+ Bugs Fixed
500 New Tests
GA
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Our Server Usability Guidelines
14
« As well adding new features, our goal in the server
team is to make MySQL easier to use.
We try to design features with the goal of making a
net improvement on usability. »
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Scalable & Stable
Better handling of high
contention, improved security,
and minimizing downtime
Data Driven
Optimizing services with real
time data analysis
Developer First
Hybrid data model and data
access APIs for flexibility for
developers
Mobile Friendly
Ready for location based
services. Handling Emoji
and Unicode characters
15
24x7at Scale
8.0 Enables Modern Web Applications
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Developers Requests
16
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
17
8.0 Features for Devs
• MySQL JSON Document Store
• New JSON functions
• Utf8mb4 as default character
• Common Table Expressions
• Window functions
• SKIP LOCKED & NOWAIT
• Functional indexes
• Function or expression as default value
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Document Store
An easy, straight forward way to work with
JSON documents in MySQL
https://mysqlserverteam.com/mysql-8-0-announcing-ga-of-the-mysql-document-store/
18
NoSQL + SQL = MySQL
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
NoSQL, MySQL, Why not…
• Have both schema-less AND schema in the same technology stack?
• One that checks all the boxes of all stakeholders:
19
Developers:
[✔] Schemaless or/and Schema
[✔] Rapid Prototyping/Simpler APIs
[✔] Document Model
[✔] Transactions
Operations:
[✔] Performance Management/Visibility
[✔] Robust Replication, Backup, Restore
[✔] Comprehensive Tooling Ecosystem
[✔] Simpler application schema upgrades
Business Owner:
[✔] Don’t lose my data = ACID transactions
[✔] Capture all my data = Extensible/Schemaless
[✔] Products On Schedule/Time to Market = Rapid Development
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 20
NoSQL
JSON Documents
Schemaless JSON Collections
MySQL
Relational Tables
Foreign Keys
X Dev API
SQL
CRUD
MySQL
Document
Store
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• MySQL X Plugin
• Introduces X Protocol for relational- and
document operations
• Maps CRUD operations to standard SQL
(relational tables, JSON datatype and
functions)
• X Protocol
• New MySQL client protocol based on top of
industry standard (Protobuf)
• Works for both, CRUD and SQL operations
• InnoDB Cluster
• Read-Scaling, Write-Scaling, HA
• X DevAPI
• New, modern, async developer API for CRUD
and SQL operations on top of X Protocol
• Introduces Collections as new Schema obj.
• MySQL Shell
• Offers interactive X DevAPI mode for app
prototyping
• MySQL Connectors
• Support for X DevAPI for
• JavaScript, Python, PHP, Java, C#, C++
21
Document Store: Components
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Document Store: Architecture
22
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 23
js> session.createSchema('demo')
js> use demo
js> db.getCollections()
js> db.createCollection('myCollection')
js> db.getCollections()
js> db.myCollection.add({"param1":"value1", "param2":"value2"})
js> db.myCollection.find()
js> db.myCollection.find().limit(1)
js> db.myCollection.find("_id = '00005af018430000000000000002'")
js> db.myCollection.modify("_id = '1234'").set("param","value")
js> db.myCollection.remove("_id = '1234'")
js> session.startTransaction()
js> …
js> session.rollback()
js> db.myCollection.createIndex("ageIdx",{fields:[{"field":"$.age","type":"INT",required:false}]})
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
MySQL Document Store “cheat sheet”
CCreate
RRead
UUpdate
DDelete
Index
TTransaction
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Shell
24Confidential - Oracle Internal 24
MySQL
Server 5.7
MySQL 8.0
Upgrade Checker
Prompt Themes
Auto Completion
&
Command History
MySQL
Server 8.0
Document Store
X DevAPI
InnoDB ClusterSQL CLI
Output Formats
(Table, JSON,
Tabbed)
Batch Execution
JavaScript
Python
SQL
Interface for Development and Administration of MySQL
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0: Upgrade Checker
27
• 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.
https://mysqlserverteam.com/mysql-shell-8-0-4-introducing-upgrade-checker-utility/
Verify whether MySQL Server instances are ready for upgrade
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• A convenient and easy way to import JSON
documents to a MySQL Server database
– Embedded help: h importJson
• Also an available API to import JSON
documents
– JS: util.importJson()
– Python: util.import_json()
• Import data from MongoDB to MySQL
– https://mysqlserverteam.com/importing-data-from-mongodb-to-mysql-using-python/
– https://mysqlserverteam.com/importing-data-from-mongodb-to-mysql-using-javascript/
28
Shell: Import JSON
Import JSON documents to a MySQL Server Collection or table (8.0.13+)
https://mysqlserverteam.com/import-json-to-mysql-made-easy-with-the-mysql-shell/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
JSON Support
• Native File Format
– Standardized as ECMA-404 (http://json.org)
– Binary Storage
• Virtual Columns
• 20+ Functions
 Search Functions
 Aggregations Functions
• Query structured data and semi-structured JSON data
29
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 30
MySQL 5.7 and 8.0
JSON_ARRAY_APPEND()
JSON_ARRAY_INSERT()
JSON_ARRAY()
JSON_CONTAINS_PATH()
JSON_CONTAINS()
JSON_DEPTH()
JSON_EXTRACT()
JSON_INSERT()
JSON_KEYS()
JSON_LENGTH()
JSON_MERGE[_PRESERVE]()
JSON_OBJECT()
JSON_QUOTE()
JSON_REMOVE()
JSON_REPLACE()
JSON_SEARCH()
JSON_SET()
JSON_TYPE()
JSON_UNQUOTE()
JSON_VALID()
JSON_PRETTY()
JSON_STORAGE_SIZE()
JSON_STORAGE_FREE()
JSON_ARRAYAGG()
JSON_OBJECTAGG()
JSON_MERGE_PATCH()
JSON_TABLE()
https://mysqlserverteam.com/mysql-8-0-from-sql-tables-to-json-documents-and-back-again/
JSON Functions
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• JSON is NOT limited to CRUD, can also be used in complex queries
• JSON_TABLE convert JSON into SQL table
• Leverage existing SQL framework for aggregation
31
JSON Functions examples - JSON_TABLE
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 32
JSON_TABLE - Extract data from a JSON document & returns
it as a relational table having the specified columns
SELECT GNP, Name, LifeExpectancy
FROM countryinfo,
JSON_TABLE(doc, "$" COLUMNS (GNP int PATH "$.GNP",
Name char(255) PATH "$.Name",
LifeExpectancy int PATH "$.demographics.LifeExpectancy")) AS jst
WHERE _id IN ('FRA', 'USA');
+---------+---------------+----------------+
| GNP | Name | LifeExpectancy |
+---------+---------------+----------------+
| 1424285 | France | 79 |
| 8510700 | United States | 77 |
+---------+---------------+----------------+
http://dasini.net/blog/2018/07/23/30-mins-with-mysql-json-functions/
JSON Functions examples - JSON_TABLE
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Emoji characters used as input
• MySQL 8.0 defaults to utf8mb4
• Latest Unicode 9.0 Support
• New collations based on DUCET,
accent and case sensitive collations,
Japanese, Russian
8.0: UTF8MB4 as default character set
33
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
1 2 4 8 16 32 64 128 256 512 1,024
0
100,000
200,000
300,000
400,000
500,000
600,000
700,000
800,000
900,000
1,000,000
MySQL 8.0
MySQL 5.7
MySQL 5.6
Users
QueriesperSecond
SysBench OLTP Read Only (Mixed - utf8mb4)
MySQL 8.0 is 40% faster than MySQL 5.7
34
OS : Oracle Linux 7.4
CPU : 48cores-HT Intel Skylake 2.7Ghz
(2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU)
RAM: 256GB
Storage : x2 Intel Optane flash devices
(Intel (R) Optane (TM) SSD P4800X Series)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0: Boosts Developer Productivity / Data Analyst Productivity
• New! CTEs and Recursive CTEs
– CTE = Common Table Expressions
– Used for hierachy traversal
• New! Window Functions
– Aggregation, Ranking, Analytics
– Used for analytics and Reporting
• New! SKIP LOCKED and NOWAIT
– Better handling of hot rows
35
Feature Request
from Developers
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Print 1 to 10
36
8.0 Common Table Expressions (CTE)
WITH RECURSIVE cte (n) AS (
SELECT 1
UNION ALL
SELECT n + 1 FROM cte WHERE n < 10
)
SELECT * FROM cte;
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+------+
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Fibonacci number (10 firsts)
37
8.0 Common Table Expressions (CTE)
WITH RECURSIVE Fibonacci (num, PrevN, N) AS (
SELECT 1, 0, 1 /* Anchor member */
UNION ALL
SELECT num+1, N, PrevN + N /* Recursive member */
FROM Fibonacci
WHERE N < 50 /* Stop condition */
)
SELECT num, PrevN as Fibonacci_Numbers FROM Fibonacci;
+------+-------------------+
| num | Fibonacci_Numbers |
+------+-------------------+
| 1 | 0 |
| 2 | 1 |
| 3 | 1 |
| 4 | 2 |
| 5 | 3 |
| 6 | 5 |
| 7 | 8 |
| 8 | 13 |
| 9 | 21 |
| 10 | 34 |
+------+-------------------+ https://en.wikipedia.org/wiki/Fibonacci_number
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Hierarchy Traversal with CTE
38
8.0 Common Table Expressions (CTE)
SELECT * FROM cte.employees;
+------+---------+------------+
| id | name | manager_id |
+------+---------+------------+
| 29 | Pedro | 198 |
| 72 | Pierre | 29 |
| 123 | Adil | 692 |
| 198 | John | 333 |
| 333 | Yasmina | NULL |
| 692 | Tarek | 333 |
| 4610 | Sarah | 29 |
+------+---------+------------+
WITH RECURSIVE emp_ext (ID, NAME, PATH) AS (
SELECT id, name, name
FROM cte.employees
WHERE manager_id IS NULL
UNION ALL
SELECT s.id, s.name, CONCAT(m.path, " <- ", s.name)
FROM emp_ext m JOIN cte.employees s ON m.id=s.manager_id
)
SELECT * FROM emp_ext ORDER BY path;
+------+---------+------------------------------------+
| ID | NAME | PATH |
+------+---------+------------------------------------+
| 333 | Yasmina | Yasmina |
| 198 | John | Yasmina <- John |
| 29 | Pedro | Yasmina <- John <- Pedro |
| 72 | Pierre | Yasmina <- John <- Pedro <- Pierre |
| 4610 | Sarah | Yasmina <- John <- Pedro <- Sarah |
| 692 | Tarek | Yasmina <- Tarek |
| 123 | Adil | Yasmina <- Tarek <- Adil |
+------+---------+------------------------------------+
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 40
8.0 Common Table Expressions (CTE)
CTE : query cost = 6.95 Left joins : query cost = 11.65
Graphs generated with
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
41
8.0 Window Functions
https://dev.mysql.com/doc/refman/8.0/en/window-functions.html
• Frequently requested feature for data analysis like ranking of data
• For each row from a query, perform a calculation using rows related to that row
• Non-aggregate window functions that, for each row from a query, perform a
calculation using rows related to that row
– FIRST_VALUE(), LAST_VALUE(), RANK(), ROW_NUMBER(), ...
– https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html
• Group (aggregate) functions that operate on sets of values.
– MAX(), MIN(), SUM(), AVG(), COUNT(), JSON_ARRAYAGG(), JSON_OBJECTAGG(), ...
– https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html
Improving Support for Analytics
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
42
8.0 Window Functions
SELECT
ROW_NUMBER() OVER() AS `#`,
year, country, product, profit
FROM sales
ORDER BY country, year, product, profit;
• A window function performs an aggregate-like operation on a set of query rows. However, whereas an aggregate
operation groups query rows into a single result row, a window function produces a result for each query row:
– The row for which function evaluation occurs is called the current row
– The query rows related to the current row over which function evaluation occurs comprise the window for the current row
+----+------+---------+------------+--------+
| # | year | country | product | profit |
+----+------+---------+------------+--------+
| 1 | 2000 | Finland | Computer | 1500 |
| 2 | 2000 | Finland | Phone | 100 |
| 3 | 2001 | Finland | Phone | 10 |
| 4 | 2000 | India | Calculator | 75 |
| 5 | 2000 | India | Calculator | 75 |
| 6 | 2000 | India | Computer | 1200 |
| 7 | 2000 | USA | Calculator | 75 |
| 8 | 2000 | USA | Computer | 1500 |
| 9 | 2001 | USA | Calculator | 50 |
| 10 | 2001 | USA | Computer | 1200 |
| 11 | 2001 | USA | Computer | 1500 |
| 12 | 2001 | USA | TV | 100 |
| 13 | 2001 | USA | TV | 150 |
+----+------+---------+------------+--------+
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
44
8.0 Window Functions
SELECT
year, country, product, profit,
SUM(profit) OVER() AS total_profit,
SUM(profit) OVER(PARTITION BY country) AS country_profit,
SUM(profit) OVER(ORDER BY country, year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulativ_sum
FROM sales
ORDER BY country, year, product, profit;
• Cumulative sum
+------+---------+------------+--------+--------------+----------------+---------------+
| year | country | product | profit | total_profit | country_profit | cumulativ_sum |
+------+---------+------------+--------+--------------+----------------+---------------+
| 2000 | Finland | Computer | 1500 | 7535 | 1610 | 1500 |
| 2000 | Finland | Phone | 100 | 7535 | 1610 | 1600 |
| 2001 | Finland | Phone | 10 | 7535 | 1610 | 1610 |
| 2000 | India | Calculator | 75 | 7535 | 1350 | 1685 |
| 2000 | India | Calculator | 75 | 7535 | 1350 | 1760 |
| 2000 | India | Computer | 1200 | 7535 | 1350 | 2960 |
| 2000 | USA | Calculator | 75 | 7535 | 4575 | 3035 |
| 2000 | USA | Computer | 1500 | 7535 | 4575 | 4535 |
| 2001 | USA | Calculator | 50 | 7535 | 4575 | 4585 |
| 2001 | USA | Computer | 1200 | 7535 | 4575 | 5785 |
| 2001 | USA | Computer | 1500 | 7535 | 4575 | 7285 |
| 2001 | USA | TV | 100 | 7535 | 4575 | 7385 |
| 2001 | USA | TV | 150 | 7535 | 4575 | 7535 |
+------+---------+------------+--------+--------------+----------------+---------------+
https://fr.slideshare.net/DagHWanvik/dublin-4x3finalslideshare-80423777
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
45
8.0 Window Functions
SELECT DISTINCT
FIRST_VALUE(value) OVER w AS First,
LAST_VALUE(value) OVER w AS Last,
SUM(value) OVER w AS Sum,
AVG(value) OVER w AS Avg,
CAST(ts AS DATE) AS date
FROM ts
WINDOW w AS (
PARTITION BY CAST(ts AS DATE)
ORDER BY ts
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
);
+-------+------+------+----------+------------+
| first | last | sum | avg | date |
+-------+------+------+----------+------------+
| 142 | 154 | 609 | 152.2500 | 2018-08-10 |
| 158 | 170 | 655 | 163.7500 | 2018-08-11 |
| 172 | 249 | 771 | 192.7500 | 2018-08-12 |
+-------+------+------+----------+------------+
• Handling Time Series
SELECT * FROM ts;
+----+-------+---------------------+
| id | value | ts |
+----+-------+---------------------+
| 1 | 142 | 2018-08-10 00:00:00 |
| 2 | 163 | 2018-08-10 06:00:00 |
| 3 | 150 | 2018-08-10 12:00:00 |
| 4 | 154 | 2018-08-10 18:00:00 |
| 5 | 158 | 2018-08-11 00:00:00 |
| 6 | 161 | 2018-08-11 06:00:00 |
| 7 | 166 | 2018-08-11 12:00:00 |
| 8 | 170 | 2018-08-11 18:00:00 |
| 9 | 172 | 2018-08-12 00:00:00 |
| 10 | 190 | 2018-08-12 06:00:00 |
| 11 | 160 | 2018-08-12 12:00:00 |
| 12 | 249 | 2018-08-12 18:00:00 |
+----+-------+---------------------+
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
46
8.0 Window Functions & JSON
SELECT doc FROM cs;
+----------------------------------------------------------------------------------------------+
| doc |
+----------------------------------------------------------------------------------------------+
| {"id": 1, "ts": "2018-08-10 00:00:00", "_id": "00005bd1ea94000000000000000d", "value": 142} |
| {"id": 2, "ts": "2018-08-10 06:00:00", "_id": "00005bd1ea94000000000000000e", "value": 163} |
| {"id": 3, "ts": "2018-08-10 12:00:00", "_id": "00005bd1ea94000000000000000f", "value": 150} |
| {"id": 4, "ts": "2018-08-10 18:00:00", "_id": "00005bd1ea940000000000000010", "value": 154} |
| {"id": 5, "ts": "2018-08-11 00:00:00", "_id": "00005bd1ea940000000000000011", "value": 158} |
| {"id": 6, "ts": "2018-08-11 06:00:00", "_id": "00005bd1ea940000000000000012", "value": 161} |
| {"id": 7, "ts": "2018-08-11 12:00:00", "_id": "00005bd1ea940000000000000013", "value": 166} |
| {"id": 8, "ts": "2018-08-11 18:00:00", "_id": "00005bd1ea940000000000000014", "value": 170} |
| {"id": 9, "ts": "2018-08-12 00:00:00", "_id": "00005bd1ea940000000000000015", "value": 172} |
| {"id": 10, "ts": "2018-08-12 06:00:00", "_id": "00005bd1ea940000000000000016", "value": 190} |
| {"id": 11, "ts": "2018-08-12 12:00:00", "_id": "00005bd1ea940000000000000017", "value": 160} |
| {"id": 12, "ts": "2018-08-12 18:00:00", "_id": "00005bd1ea940000000000000018", "value": 249} |
+----------------------------------------------------------------------------------------------+
• Handling Time Series data in a JSON column or from a collection
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
47
8.0 Window Functions & JSON
SELECT DISTINCT
FIRST_VALUE(value) OVER w AS First,
LAST_VALUE(value) OVER w AS Last,
SUM(value) OVER w AS Sum,
AVG(value) OVER w AS Avg,
CAST(ts AS DATE) AS date
FROM cs, JSON_TABLE(doc, "$" COLUMNS (id int PATH "$.id",
value int PATH "$.value",
ts timestamp PATH "$.ts")) AS tcs
WINDOW w AS (
PARTITION BY CAST(ts AS DATE)
ORDER BY ts
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
);
+-------+------+------+----------+------------+
| first | last | sum | avg | date |
+-------+------+------+----------+------------+
| 142 | 154 | 609 | 152.2500 | 2018-08-10 |
| 158 | 170 | 655 | 163.7500 | 2018-08-11 |
| 172 | 249 | 771 | 192.7500 | 2018-08-12 |
+-------+------+------+----------+------------+
• Handling Time Series data in a JSON column or from a collection
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
48
https://dev.mysql.com/doc/refman/8.0/en/innodb-locking-reads.html#innodb-locking-reads-nowait-skip-locked
SELECT seat_no
FROM seats
JOIN seat_rows USING ( row_no )
WHERE seat_no IN (3,4)
AND seat_rows.row_no IN (12)
AND booked = 'NO'
FOR UPDATE OF seats SKIP LOCKED
FOR SHARE OF seat_rows NOWAIT;
• Locking Read Concurrency with NOWAIT and SKIP LOCKED
8.0 Better Handling Hot Row Contention 1/2
SKIP LOCKED / NOWAIT
Non deterministically
skip over
locked rows
Error immediately
if a row is
already locked
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
49
-- Session 1
START TRANSACTION;
SELECT * FROM t WHERE i = 2 FOR UPDATE;
+---+
| i |
+---+
| 2 |
+---+
8.0 Better Handling Hot Row Contention 2/2
SKIP LOCKED / NOWAIT
-- Session 2
START TRANSACTION;
SELECT * FROM t WHERE i = 2 FOR UPDATE NOWAIT;
ERROR 3572 (HY000): Statement aborted because lock(s) could not be
acquired immediately and NOWAIT is set.
-- Session 3
START TRANSACTION;
SELECT * FROM t FOR UPDATE SKIP LOCKED;
+---+
| i |
+---+
| 1 |
| 3 |
+---+
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0 UUID and Bit-wise Improvements
• Functions to convert UUID to and from binary:
– UUID_TO_BIN()
– BIN_TO_UUID()
– plus IS_UUID()
• Binary format is now smaller and insert-order efficient:
11e678fe53303f87a4778c89a52c4f3b
53303f87-78fe-11e6-a477-8c89a52c4f3bFrom VARCHAR(36)
To VARBINARY(16)
• Bit-wise operations on binary data types.
• Bit-wise operations on binary data types.
– Designed with IPv6 in mind:
●
INET6_ATON(address) & INET6_ATON(network)
50
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0 SQL Functional Indexes
• Add the possibility to create functional indexes in MySQL
– Implemented as indexed hidden generated columns
51
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));
https://dev.mysql.com/worklog/task/?id=1075
Support for functional index (8.0.13+)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0 SQL Default Value
• Add the capability to use functions as default values as well as allowing
default values for GIS and JSON datatypes
– The most common use case would be to emulate a UUID-like auto_increment
52
https://dev.mysql.com/worklog/task/?id=9418
Permit default value to be a function or expression (8.0.13+)
CREATE TABLE t0
( id BINARY(16) DEFAULT (uuid_to_bin(uuid())), doc JSON DEFAULT ('[]') );
INSERT INTO t0 () VALUES ();
Query OK, 1 row affected (0,11 sec)
SELECT bin_to_uuid(id), doc FROM t0;
+--------------------------------------+------+
| bin_to_uuid(id) | doc |
+--------------------------------------+------+
| f6d56292-d8a6-11e8-a42f-dc53609b8b8d | [] |
+--------------------------------------+------+
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
DBAs/OPS Requests
53
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
54
8.0 Features for DBAs
• MySQL 8.0 InnoDB Cluster
• Instant Add Column
• Invisible indexes
• Persist Configuration
• Upgrade Checker utility
• GIS Improvement
• Prohibits table w/o primary Key
• Histograms
• Improved Security
• Improve Performance
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Virtually all organizations require their
most critical systems to be highly available
55
100%
High Availability
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
InnoDB Cluster
56
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
“High Availability becomes a core
first class feature of MySQL!”
https://mysqlserverteam.com/mysql-innodb-cluster-8-0-ga-is-available-now/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Shell: DBA Admin API
• The global variable 'dba' is used to access the MySQL AdminAPI
• JS> dba.help()
• Perform DBA operations
– Manage MySQL InnoDB clusters
• Create clusters
• Validate MySQL instances
• Configure MySQL instances
• Get cluster info
• Modify clusters
• and much more ...
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
57
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Group Replication: Database HA
• Group Replication library
– Implementation of Replicated Database State Machine
• MySQL GCS is based on our home-grown Paxos implementation
– Provides virtually synchronous replication for MySQL 5.7+
• Guarantees eventual consistency
– Automates operations
• Conflict detection and resolution
• Failure detection, fail-over, recovery
• Group membership management and reconfiguration
“Multi-master update anywhere replication plugin for MySQL with built-in conflict detection
and resolution, automatic distributed recovery, and group membership.”
58
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0: Alter Table – Instant Add Column
• Contribution from Tencent Games
– Only a metadata change
– No copying of data
– Smaller final data size
– Forward compatibility with old data file
• ALTER TABLE ... ADD COLUMN c, ALGORITHM = INSTANT
• Supports DYNAMIC/COMPACT/REDUNDANT row formats
59
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
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
60
Feature Request
from 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;
e.g. Soft Delete
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0: Persist Configuration
61
Cloud Friendly
• Persist Global Server Variables
 SET PERSIST max_connections = 500 ;
• Examples Inlude :
 Offline_mode
 Read_Only
• Requires no filesystem access
• Inludes timestamp and change user
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Highly Accurate
 Now better than competitor databases
• High Performance
• Simple – No extra configuration or installation
 Completely built in and ready to use
• Powerful
 Full Geography Support

Projected – Flat/Across 2 dimensions

Geographic – Spheroid
 Details

5107 predefined SRSs from the EPSG Dataset 9.2
 4628 projected
 479 gegraphic
8.0: GIS Improvements
62
https://mysqlserverteam.com/spatial-reference-systems-in-mysql-8-0/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0 Prohibits Tables w/o Primary Key
• New system variable : sql_require_primary_key
• Cause CREATE or ALTER statements that would yield a table without
primary key, to fail
• Tables without primary keys may cause performance problems
• https://dev.mysql.com/worklog/task/?id=11807
63
https://dev.mysql.com/worklog/task/?id=9418
Option to Disallow Tables without a Primary Key (8.0.13+)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
8.0: InnoDB Improvements
• Document Store/JSON
– More efficient BLOBs, up to 4x improvement on update
– Better performance for both small and large BLOBs
• New Scalable WAL
– Lock free design
• Atomic DDL
• Persistent Auto Increment
• Contention Aware Transaction Scheduling (CATS)
– Contribution from University of Michigan
• Removed IO bottlenecks
– More scalable design
64
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Performance Improvements
65
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
New! Performance Improvements
• Improved Query Consistency
– Histograms
– Improved Cost Model
• Faster Table/Range Scans
66
• Parallel Replication
• UTF8MB4
• Information Schema
• Performance Schema Indexes
http://dimitrik.free.fr/blog/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 67
OS : Oracle Linux 7.4
CPU : 48cores-HT Intel Skylake 2.7Ghz
(2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU)
RAM: 256GB
Storage : x2 Intel Optane flash devices
(Intel (R) Optane (TM) SSD P4800X Series)
2x Faster than MySQL 5.7
8.0: SysBench IO Bound Read Only (Point Selects)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 68
OS : Oracle Linux 7.4
CPU : 48cores-HT Intel Skylake 2.7Ghz
(2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU)
RAM: 256GB
Storage : x2 Intel Optane flash devices
(Intel (R) Optane (TM) SSD P4800X Series)
2x Faster than MySQL 5.7
8.0: SysBench Read/Write (Update NoKey)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Column statistics
8.0: Histograms
Feature Request
by DBAs• Provides the optimizer with information about column value distribution
• Better query plans
– More consistent QEP for cases when data is skewed
– Lower cost to maintain than an index
• To create/recalculate histogram for a column:
– ANALYZE TABLE table UPDATE HISTOGRAM ON column WITH n BUCKETS;
• May use sampling
– Sample size is based on available memory ( histogram_generation_max_mem_size )
• Automatically chooses between two histogram types:
– Singleton: One value per bucket
– Equi-height: Multiple value per bucket
69
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Improved to consider buffer pool fit
8.0: Optimizer Cost Model
Feature Request
by DBAs• Storage engines :
– Estimate for how much of data and
indexes are in memory buffer
– Estimate for hit rate for memory buffer
• Optimizer cost model :
– Take into account wether data is already
in memory or need to be read from disk
70
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 71
Improved to consider buffer pool fit
8.0: Optimizer Cost Model
Feature Request
by DBAs
In Memory
innodb_buffer_pool=32G
Disk Bond
innodb_buffer_pool=1G
Plan A 5.8 secs 9 min 47 secs
Plan B 77.5 secs 3 min 49 secs
In Memory
innodb_buffer_pool=32G
Disk Bond
innodb_buffer_pool=1G
MySQL 5.6 Plan B
MySQL 5.7 Plan A
MySQL 8.0 Plan A Plan B
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
System Configuration :
Oracle Linux 7,
Intel(R) Xeon(R) CPU E7-4860 2.27GHz
40 cores-HT
No Resource Group
(40 Cores Shared)
With Resource Group
(40 Cores for Select)
(10 Cores for Update RG)
72
Control resource usage for DML load
8.0 Resource Group Example
https://dev.mysql.com/doc/refman/8.0/en/resource-groups.html
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 7
3
8.0: All these features plus…
• Source code now documented with Doxygen
• Plugin Infrastructure!
• Expanded GIS Support
• Expanded Query Hints Support
• Improved Scan Query Performance
• Improved BLOB Storage
• Improved Memcached Interface
• Cost Model Improvements
• Scalability Improvements
• Atomicity in Privileges
• Parser Refactoring
• Improvements to Temporary Tables
• C++11 and Toolchain Improvements
• GTID_PURGED always settable
• Persistent Auto Increment
• Native InnoDB Data dictionary
• Improved Information Schema performance
• SQL Grouping Function
• Optimizer Trace detailed sort statistics
• Descending Indexes
• Smaller Package Downloads
• JSON Aggregate, Pretty print functions
• JSON performance improvements
• Expanded Query Hints
• Improved usability of cost constant
configuration
• Group Replication in 8.0
• Transaction Save Point support in Group
Replication
• Improved Replication Applier Lag Statistics
in Performance Schema
• Per Multi-source Channel Replication Filters
• Atomic DDL extended to the Binary Log
• Performance Improvements on the
Replication Applier
• Parallel Replication Applier Policy
• Binary Log Management Enhancements
• Additional Metadata Into the Binary Log
• Improve SELECT COUNT(*) performance
• Multiple addresses for --bind-address
• Support for BLOBs in temp table engine
• ...
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 74
• DocStore
– SQL + NoSQL = MySQL
• InnoDB Cluster
– HA made easy
• SQL
• JSON
• GIS
8.0 – Innovating and Evolving
• Replication
• Reliability
• Observability
• Manageability
• Security
• Performance
• Scalability
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Resources – MySQL Blogs 1/3
75
• MySQL Server Team’s blog
– http://mysqlserverteam.com/
• MySQL High Availability Team’s blog
– http://mysqlhighavailability.com/
• MySQL Release Engineering Blog
– https://mysqlrelease.com/
• MySQL Dev Team Blog
– https://insidemysql.com/
• MySQL Enterprise Team Blogs
– https://blogs.oracle.com/mysql/
• Lefred’s blog (MySQL Community Manager)
– http://lefred.be/
• Olivier Dasini’s blog
– http://dasini.net/blog/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Resources – MySQL Blogs 2/3
76
• MySQL Document Store
– https://dev.mysql.com/doc/x-devapi-userguide/en/
– https://github.com/mysql/mysql-connector-nodejs
– https://www.npmjs.com/package/@mysql/xdevapi
– https://dev.mysql.com/doc/refman/8.0/en/document-store.html
– https://dev.mysql.com/doc/x-devapi-userguide/en/
– https://dev.mysql.com/doc/dev/connector-nodejs/8.0/
– https://www.mysql.com/news-and-events/web-seminars/mysql-document-store-and-node-js/
• MySQL Performance by Dimitri
– http://dimitrik.free.fr/blog/archives/2018/04/mysql-performance-over-18m-qps-with-80-ga-on-2s-skylake.html
– http://dimitrik.free.fr/blog/archives/2018/04/mysql-performance-80-and-utf8-impact.html
• MySQL InnoDB Cluster
– https://mysqlserverteam.com/mysql-innodb-cluster-8-0-ga-is-available-now/
– https://mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-ga-release/
– https://mysqlserverteam.com/mysql-innodb-cluster-8-0-a-hands-on-tutorial/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Resources – MySQL Blogs 3/3
77
• Common Table Expressions (CTE)
– http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes/
– http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes-part-two-how-to-generate-series/
– http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes-part-three-hierarchies/
– http://mysqlserverteam.com/mysql-8-0-1-recursive-common-table-expressions-in-mysql-ctes-part-four-depth-first-or-breadth-first-traversal-
transitive-closure-cycle-avoidance/
• Window Functions
– http://mysqlserverteam.com/mysql-8-0-2-introducing-window-functions/
– https://mysqlserverteam.com/row-numbering-ranking-how-to-use-less-user-variables-in-mysql-queries/
– https://fr.slideshare.net/DagHWanvik/dublin-4x3finalslideshare-80423777
• Security
– https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/
– https://mysqlserverteam.com/mysql-8-0-4-openssl-and-mysql-community-edition/
– http://lefred.be/content/mysql-8-0-listing-roles/
– https://dev.mysql.com/doc/refman/8.0/en/password-management.html
• Upgrade from 5.7 to 8.0
– https://mysqlserverteam.com/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/
– https://mysqlserverteam.com/upgrading-to-mysql-8-0-here-is-what-you-need-to-know/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Thanks for using MySQL!
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?

Contenu connexe

Tendances

MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreOlivier DASINI
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018Olivier DASINI
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamOlivier DASINI
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryOlivier DASINI
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryOlivier DASINI
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsOlivier DASINI
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...Olivier DASINI
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryOlivier DASINI
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Olivier DASINI
 
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinOlivier DASINI
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best PracticesOlivier DASINI
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceOlivier DASINI
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionOlivier DASINI
 
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...Olivier DASINI
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONMario Beck
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMorgan Tocker
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)Olivier DASINI
 
InnoDB Tablespace Encryption
InnoDB Tablespace Encryption InnoDB Tablespace Encryption
InnoDB Tablespace Encryption Satya Bodapati
 

Tendances (20)

MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features Summary
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features Summary
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features Summary
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8
 
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The Dolphin
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
 
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
 
InnoDB Tablespace Encryption
InnoDB Tablespace Encryption InnoDB Tablespace Encryption
InnoDB Tablespace Encryption
 

Similaire à MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?

MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.Cloud Native Day Tel Aviv
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreFilipe Silva
 
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...Geir Høydalsvik
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document StoreRui Quelhas
 
MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)Vittorio Cioe
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMiguel Araújo
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JSMySQL Document Store and Node.JS
MySQL Document Store and Node.JSReggie Burnett
 
MySQL 8 loves JavaScript
MySQL 8 loves JavaScript MySQL 8 loves JavaScript
MySQL 8 loves JavaScript Sanjay Manwani
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...Olivier DASINI
 
20190713_MySQL開発最新動向
20190713_MySQL開発最新動向20190713_MySQL開発最新動向
20190713_MySQL開発最新動向Machiko Ikoma
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreOracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreMark Swarbrick
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIMySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIRui Quelhas
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...GeneXus
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1Ivan Ma
 
20190915_MySQL開発最新動向
20190915_MySQL開発最新動向20190915_MySQL開発最新動向
20190915_MySQL開発最新動向Machiko Ikoma
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLManuel Contreras
 
Python and the MySQL Document Store
Python and the MySQL Document StorePython and the MySQL Document Store
Python and the MySQL Document StoreJesper Wisborg Krogh
 

Similaire à MySQL Day Paris 2018 - What’s New in MySQL 8.0 ? (20)

MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
 
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document Store
 
MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
 
Mysql8for blr usercamp
Mysql8for blr usercampMysql8for blr usercamp
Mysql8for blr usercamp
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JSMySQL Document Store and Node.JS
MySQL Document Store and Node.JS
 
MySQL 8 loves JavaScript
MySQL 8 loves JavaScript MySQL 8 loves JavaScript
MySQL 8 loves JavaScript
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
 
20190713_MySQL開発最新動向
20190713_MySQL開発最新動向20190713_MySQL開発最新動向
20190713_MySQL開発最新動向
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreOracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document Store
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIMySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
MySQL 8
MySQL 8MySQL 8
MySQL 8
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
20190915_MySQL開発最新動向
20190915_MySQL開発最新動向20190915_MySQL開発最新動向
20190915_MySQL開発最新動向
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQL
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
Python and the MySQL Document Store
Python and the MySQL Document StorePython and the MySQL Document Store
Python and the MySQL Document Store
 

Plus de Olivier DASINI

MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisOlivier DASINI
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreOlivier DASINI
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterOlivier DASINI
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7Olivier DASINI
 
Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeOlivier DASINI
 

Plus de Olivier DASINI (6)

MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7
 
Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtime
 

Dernier

Artificial organ courses Hussein L1-C2.pptx
Artificial organ courses Hussein  L1-C2.pptxArtificial organ courses Hussein  L1-C2.pptx
Artificial organ courses Hussein L1-C2.pptxHusseinMishbak
 
عناصر نباتية PDF.pdf architecture engineering
عناصر نباتية PDF.pdf architecture engineeringعناصر نباتية PDF.pdf architecture engineering
عناصر نباتية PDF.pdf architecture engineeringmennamohamed200y
 
Support nodes for large-span coal storage structures
Support nodes for large-span coal storage structuresSupport nodes for large-span coal storage structures
Support nodes for large-span coal storage structureswendy cai
 
A brief about Jeypore Sub-station Presentation
A brief about Jeypore Sub-station PresentationA brief about Jeypore Sub-station Presentation
A brief about Jeypore Sub-station PresentationJeyporess2021
 
zomato data mining datasets for quality prefernece and conntrol.pptx
zomato data mining  datasets for quality prefernece and conntrol.pptxzomato data mining  datasets for quality prefernece and conntrol.pptx
zomato data mining datasets for quality prefernece and conntrol.pptxPratikMhatre39
 
Introduction to Machine Learning Unit-2 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-2 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-2 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-2 Notes for II-II Mechanical EngineeringC Sai Kiran
 
autonomous_vehicle_working_paper_01072020-_508_compliant.pdf
autonomous_vehicle_working_paper_01072020-_508_compliant.pdfautonomous_vehicle_working_paper_01072020-_508_compliant.pdf
autonomous_vehicle_working_paper_01072020-_508_compliant.pdfPandurangGurakhe
 
NIPORT Home Economics Questions Solution 2024.pdf
NIPORT Home Economics Questions Solution 2024.pdfNIPORT Home Economics Questions Solution 2024.pdf
NIPORT Home Economics Questions Solution 2024.pdfMohonDas
 
Governors ppt.pdf .
Governors ppt.pdf                              .Governors ppt.pdf                              .
Governors ppt.pdf .happycocoman
 
Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)
Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)
Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)Mizan Rahman
 
Flutter GDE session GDSC ZHCET AMU, aligarh
Flutter GDE session GDSC ZHCET AMU, aligarhFlutter GDE session GDSC ZHCET AMU, aligarh
Flutter GDE session GDSC ZHCET AMU, aligarhjamesbond00714
 
Final PPT.ppt about human detection and counting
Final PPT.ppt  about human detection and countingFinal PPT.ppt  about human detection and counting
Final PPT.ppt about human detection and countingArbazAhmad25
 
Navigating Process Safety through Automation and Digitalization in the Oil an...
Navigating Process Safety through Automation and Digitalization in the Oil an...Navigating Process Safety through Automation and Digitalization in the Oil an...
Navigating Process Safety through Automation and Digitalization in the Oil an...soginsider
 
The Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesThe Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesJacopo Nardiello
 
PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...
PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...
PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...Luuk Brederode
 
Research paper publications: Meaning of Q1 Q2 Q3 Q4 Journal
Research paper publications: Meaning of Q1 Q2 Q3 Q4 JournalResearch paper publications: Meaning of Q1 Q2 Q3 Q4 Journal
Research paper publications: Meaning of Q1 Q2 Q3 Q4 JournalDr. Manjunatha. P
 
Evaluation Methods for Social XR Experiences
Evaluation Methods for Social XR ExperiencesEvaluation Methods for Social XR Experiences
Evaluation Methods for Social XR ExperiencesMark Billinghurst
 
The Journey of Process Safety Management: Past, Present, and Future Trends
The Journey of Process Safety Management: Past, Present, and Future TrendsThe Journey of Process Safety Management: Past, Present, and Future Trends
The Journey of Process Safety Management: Past, Present, and Future Trendssoginsider
 
introduction to python, fundamentals and basics
introduction to python, fundamentals and basicsintroduction to python, fundamentals and basics
introduction to python, fundamentals and basicsKNaveenKumarECE
 

Dernier (20)

Artificial organ courses Hussein L1-C2.pptx
Artificial organ courses Hussein  L1-C2.pptxArtificial organ courses Hussein  L1-C2.pptx
Artificial organ courses Hussein L1-C2.pptx
 
عناصر نباتية PDF.pdf architecture engineering
عناصر نباتية PDF.pdf architecture engineeringعناصر نباتية PDF.pdf architecture engineering
عناصر نباتية PDF.pdf architecture engineering
 
Support nodes for large-span coal storage structures
Support nodes for large-span coal storage structuresSupport nodes for large-span coal storage structures
Support nodes for large-span coal storage structures
 
A brief about Jeypore Sub-station Presentation
A brief about Jeypore Sub-station PresentationA brief about Jeypore Sub-station Presentation
A brief about Jeypore Sub-station Presentation
 
zomato data mining datasets for quality prefernece and conntrol.pptx
zomato data mining  datasets for quality prefernece and conntrol.pptxzomato data mining  datasets for quality prefernece and conntrol.pptx
zomato data mining datasets for quality prefernece and conntrol.pptx
 
Introduction to Machine Learning Unit-2 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-2 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-2 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-2 Notes for II-II Mechanical Engineering
 
autonomous_vehicle_working_paper_01072020-_508_compliant.pdf
autonomous_vehicle_working_paper_01072020-_508_compliant.pdfautonomous_vehicle_working_paper_01072020-_508_compliant.pdf
autonomous_vehicle_working_paper_01072020-_508_compliant.pdf
 
Hydraulic Loading System - Neometrix Defence
Hydraulic Loading System - Neometrix DefenceHydraulic Loading System - Neometrix Defence
Hydraulic Loading System - Neometrix Defence
 
NIPORT Home Economics Questions Solution 2024.pdf
NIPORT Home Economics Questions Solution 2024.pdfNIPORT Home Economics Questions Solution 2024.pdf
NIPORT Home Economics Questions Solution 2024.pdf
 
Governors ppt.pdf .
Governors ppt.pdf                              .Governors ppt.pdf                              .
Governors ppt.pdf .
 
Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)
Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)
Fabrics Finishing Manual ( Arkey Knit Dyeing Mills Ltd)
 
Flutter GDE session GDSC ZHCET AMU, aligarh
Flutter GDE session GDSC ZHCET AMU, aligarhFlutter GDE session GDSC ZHCET AMU, aligarh
Flutter GDE session GDSC ZHCET AMU, aligarh
 
Final PPT.ppt about human detection and counting
Final PPT.ppt  about human detection and countingFinal PPT.ppt  about human detection and counting
Final PPT.ppt about human detection and counting
 
Navigating Process Safety through Automation and Digitalization in the Oil an...
Navigating Process Safety through Automation and Digitalization in the Oil an...Navigating Process Safety through Automation and Digitalization in the Oil an...
Navigating Process Safety through Automation and Digitalization in the Oil an...
 
The Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesThe Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on Kubernetes
 
PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...
PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...
PhD summary of Luuk Brederode, presented at 2023-10-17 to Veitch Lister Consu...
 
Research paper publications: Meaning of Q1 Q2 Q3 Q4 Journal
Research paper publications: Meaning of Q1 Q2 Q3 Q4 JournalResearch paper publications: Meaning of Q1 Q2 Q3 Q4 Journal
Research paper publications: Meaning of Q1 Q2 Q3 Q4 Journal
 
Evaluation Methods for Social XR Experiences
Evaluation Methods for Social XR ExperiencesEvaluation Methods for Social XR Experiences
Evaluation Methods for Social XR Experiences
 
The Journey of Process Safety Management: Past, Present, and Future Trends
The Journey of Process Safety Management: Past, Present, and Future TrendsThe Journey of Process Safety Management: Past, Present, and Future Trends
The Journey of Process Safety Management: Past, Present, and Future Trends
 
introduction to python, fundamentals and basics
introduction to python, fundamentals and basicsintroduction to python, fundamentals and basics
introduction to python, fundamentals and basics
 

MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Olivier Dasini MySQL Principal Solutions Architect EMEA olivier.dasini@oracle.com Twitter : @freshdaz Blog : http://dasini.net/blog What’s New in MySQL 8.0 ?
  • 2. 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.
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Agenda Introduction MySQL 8.0 Features for Developers MySQL 8.0 Features for DBAs 1 2 3 3
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Me, Myself & I  MySQL Geek  Addicted to MySQL for 15+ years!  Playing with databases for 20+ years  MySQL Writer, Blogger and Speaker  Also former : DBA, Consultant, Architect, Trainer, ...  MySQL Principal Solutions Architect EMEA at Oracle  Stay tuned! :  Twitter: @freshdaz  Blog: http://dasini.net/blog 4 Olivier DASINI
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The world's most popular open source database 5
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Stack Overflow Developer Survey 2018 Developer Survey Results MySQL is the most popular database
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | JetBrains Survey 2018 The State of Developer Ecosystem MySQL is the most popular database
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Powers Social 8
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Powers eCommerce 9
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Powers SaaS 10
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Powers Finance 11
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Powers the Cloud 12
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Continuous Innovation: 5.7 -> 8.0 13 - 3x Better Performance - Replication Enhancements - Optimizer Cost Model - JSON Support - Improved Security - Sys & Performance Schema - GIS MySQL 5.7 (GA) MySQL InnoDB Cluster (GA) - MySQL Group Replication - MySQL Router - MySQL Shell MySQL 8.0 (GA) - NoSQL Document Store - JSON - New Data Dictionary - Roles - Unicode - CTEs - Window Functions - Improved Security - Improved Replication - Improved GIS - Histograms - Resource Group - ... 2 Years in Development 400+ Worklogs 5000+ Bugs Fixed 500 New Tests GA
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Our Server Usability Guidelines 14 « As well adding new features, our goal in the server team is to make MySQL easier to use. We try to design features with the goal of making a net improvement on usability. »
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Scalable & Stable Better handling of high contention, improved security, and minimizing downtime Data Driven Optimizing services with real time data analysis Developer First Hybrid data model and data access APIs for flexibility for developers Mobile Friendly Ready for location based services. Handling Emoji and Unicode characters 15 24x7at Scale 8.0 Enables Modern Web Applications
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Developers Requests 16
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 17 8.0 Features for Devs • MySQL JSON Document Store • New JSON functions • Utf8mb4 as default character • Common Table Expressions • Window functions • SKIP LOCKED & NOWAIT • Functional indexes • Function or expression as default value
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Document Store An easy, straight forward way to work with JSON documents in MySQL https://mysqlserverteam.com/mysql-8-0-announcing-ga-of-the-mysql-document-store/ 18 NoSQL + SQL = MySQL
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | NoSQL, MySQL, Why not… • Have both schema-less AND schema in the same technology stack? • One that checks all the boxes of all stakeholders: 19 Developers: [✔] Schemaless or/and Schema [✔] Rapid Prototyping/Simpler APIs [✔] Document Model [✔] Transactions Operations: [✔] Performance Management/Visibility [✔] Robust Replication, Backup, Restore [✔] Comprehensive Tooling Ecosystem [✔] Simpler application schema upgrades Business Owner: [✔] Don’t lose my data = ACID transactions [✔] Capture all my data = Extensible/Schemaless [✔] Products On Schedule/Time to Market = Rapid Development
  • 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 20 NoSQL JSON Documents Schemaless JSON Collections MySQL Relational Tables Foreign Keys X Dev API SQL CRUD MySQL Document Store
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • MySQL X Plugin • Introduces X Protocol for relational- and document operations • Maps CRUD operations to standard SQL (relational tables, JSON datatype and functions) • X Protocol • New MySQL client protocol based on top of industry standard (Protobuf) • Works for both, CRUD and SQL operations • InnoDB Cluster • Read-Scaling, Write-Scaling, HA • X DevAPI • New, modern, async developer API for CRUD and SQL operations on top of X Protocol • Introduces Collections as new Schema obj. • MySQL Shell • Offers interactive X DevAPI mode for app prototyping • MySQL Connectors • Support for X DevAPI for • JavaScript, Python, PHP, Java, C#, C++ 21 Document Store: Components
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Document Store: Architecture 22
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 23 js> session.createSchema('demo') js> use demo js> db.getCollections() js> db.createCollection('myCollection') js> db.getCollections() js> db.myCollection.add({"param1":"value1", "param2":"value2"}) js> db.myCollection.find() js> db.myCollection.find().limit(1) js> db.myCollection.find("_id = '00005af018430000000000000002'") js> db.myCollection.modify("_id = '1234'").set("param","value") js> db.myCollection.remove("_id = '1234'") js> session.startTransaction() js> … js> session.rollback() js> db.myCollection.createIndex("ageIdx",{fields:[{"field":"$.age","type":"INT",required:false}]}) Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. MySQL Document Store “cheat sheet” CCreate RRead UUpdate DDelete Index TTransaction
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Shell 24Confidential - Oracle Internal 24 MySQL Server 5.7 MySQL 8.0 Upgrade Checker Prompt Themes Auto Completion & Command History MySQL Server 8.0 Document Store X DevAPI InnoDB ClusterSQL CLI Output Formats (Table, JSON, Tabbed) Batch Execution JavaScript Python SQL Interface for Development and Administration of MySQL
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0: Upgrade Checker 27 • 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. https://mysqlserverteam.com/mysql-shell-8-0-4-introducing-upgrade-checker-utility/ Verify whether MySQL Server instances are ready for upgrade
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • A convenient and easy way to import JSON documents to a MySQL Server database – Embedded help: h importJson • Also an available API to import JSON documents – JS: util.importJson() – Python: util.import_json() • Import data from MongoDB to MySQL – https://mysqlserverteam.com/importing-data-from-mongodb-to-mysql-using-python/ – https://mysqlserverteam.com/importing-data-from-mongodb-to-mysql-using-javascript/ 28 Shell: Import JSON Import JSON documents to a MySQL Server Collection or table (8.0.13+) https://mysqlserverteam.com/import-json-to-mysql-made-easy-with-the-mysql-shell/
  • 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | JSON Support • Native File Format – Standardized as ECMA-404 (http://json.org) – Binary Storage • Virtual Columns • 20+ Functions  Search Functions  Aggregations Functions • Query structured data and semi-structured JSON data 29
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 30 MySQL 5.7 and 8.0 JSON_ARRAY_APPEND() JSON_ARRAY_INSERT() JSON_ARRAY() JSON_CONTAINS_PATH() JSON_CONTAINS() JSON_DEPTH() JSON_EXTRACT() JSON_INSERT() JSON_KEYS() JSON_LENGTH() JSON_MERGE[_PRESERVE]() JSON_OBJECT() JSON_QUOTE() JSON_REMOVE() JSON_REPLACE() JSON_SEARCH() JSON_SET() JSON_TYPE() JSON_UNQUOTE() JSON_VALID() JSON_PRETTY() JSON_STORAGE_SIZE() JSON_STORAGE_FREE() JSON_ARRAYAGG() JSON_OBJECTAGG() JSON_MERGE_PATCH() JSON_TABLE() https://mysqlserverteam.com/mysql-8-0-from-sql-tables-to-json-documents-and-back-again/ JSON Functions
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • JSON is NOT limited to CRUD, can also be used in complex queries • JSON_TABLE convert JSON into SQL table • Leverage existing SQL framework for aggregation 31 JSON Functions examples - JSON_TABLE
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 32 JSON_TABLE - Extract data from a JSON document & returns it as a relational table having the specified columns SELECT GNP, Name, LifeExpectancy FROM countryinfo, JSON_TABLE(doc, "$" COLUMNS (GNP int PATH "$.GNP", Name char(255) PATH "$.Name", LifeExpectancy int PATH "$.demographics.LifeExpectancy")) AS jst WHERE _id IN ('FRA', 'USA'); +---------+---------------+----------------+ | GNP | Name | LifeExpectancy | +---------+---------------+----------------+ | 1424285 | France | 79 | | 8510700 | United States | 77 | +---------+---------------+----------------+ http://dasini.net/blog/2018/07/23/30-mins-with-mysql-json-functions/ JSON Functions examples - JSON_TABLE
  • 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • Emoji characters used as input • MySQL 8.0 defaults to utf8mb4 • Latest Unicode 9.0 Support • New collations based on DUCET, accent and case sensitive collations, Japanese, Russian 8.0: UTF8MB4 as default character set 33
  • 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 1 2 4 8 16 32 64 128 256 512 1,024 0 100,000 200,000 300,000 400,000 500,000 600,000 700,000 800,000 900,000 1,000,000 MySQL 8.0 MySQL 5.7 MySQL 5.6 Users QueriesperSecond SysBench OLTP Read Only (Mixed - utf8mb4) MySQL 8.0 is 40% faster than MySQL 5.7 34 OS : Oracle Linux 7.4 CPU : 48cores-HT Intel Skylake 2.7Ghz (2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU) RAM: 256GB Storage : x2 Intel Optane flash devices (Intel (R) Optane (TM) SSD P4800X Series)
  • 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0: Boosts Developer Productivity / Data Analyst Productivity • New! CTEs and Recursive CTEs – CTE = Common Table Expressions – Used for hierachy traversal • New! Window Functions – Aggregation, Ranking, Analytics – Used for analytics and Reporting • New! SKIP LOCKED and NOWAIT – Better handling of hot rows 35 Feature Request from Developers
  • 34. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • Print 1 to 10 36 8.0 Common Table Expressions (CTE) WITH RECURSIVE cte (n) AS ( SELECT 1 UNION ALL SELECT n + 1 FROM cte WHERE n < 10 ) SELECT * FROM cte; +------+ | n | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | | 8 | | 9 | | 10 | +------+
  • 35. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • Fibonacci number (10 firsts) 37 8.0 Common Table Expressions (CTE) WITH RECURSIVE Fibonacci (num, PrevN, N) AS ( SELECT 1, 0, 1 /* Anchor member */ UNION ALL SELECT num+1, N, PrevN + N /* Recursive member */ FROM Fibonacci WHERE N < 50 /* Stop condition */ ) SELECT num, PrevN as Fibonacci_Numbers FROM Fibonacci; +------+-------------------+ | num | Fibonacci_Numbers | +------+-------------------+ | 1 | 0 | | 2 | 1 | | 3 | 1 | | 4 | 2 | | 5 | 3 | | 6 | 5 | | 7 | 8 | | 8 | 13 | | 9 | 21 | | 10 | 34 | +------+-------------------+ https://en.wikipedia.org/wiki/Fibonacci_number
  • 36. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • Hierarchy Traversal with CTE 38 8.0 Common Table Expressions (CTE) SELECT * FROM cte.employees; +------+---------+------------+ | id | name | manager_id | +------+---------+------------+ | 29 | Pedro | 198 | | 72 | Pierre | 29 | | 123 | Adil | 692 | | 198 | John | 333 | | 333 | Yasmina | NULL | | 692 | Tarek | 333 | | 4610 | Sarah | 29 | +------+---------+------------+ WITH RECURSIVE emp_ext (ID, NAME, PATH) AS ( SELECT id, name, name FROM cte.employees WHERE manager_id IS NULL UNION ALL SELECT s.id, s.name, CONCAT(m.path, " <- ", s.name) FROM emp_ext m JOIN cte.employees s ON m.id=s.manager_id ) SELECT * FROM emp_ext ORDER BY path; +------+---------+------------------------------------+ | ID | NAME | PATH | +------+---------+------------------------------------+ | 333 | Yasmina | Yasmina | | 198 | John | Yasmina <- John | | 29 | Pedro | Yasmina <- John <- Pedro | | 72 | Pierre | Yasmina <- John <- Pedro <- Pierre | | 4610 | Sarah | Yasmina <- John <- Pedro <- Sarah | | 692 | Tarek | Yasmina <- Tarek | | 123 | Adil | Yasmina <- Tarek <- Adil | +------+---------+------------------------------------+
  • 37. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 40 8.0 Common Table Expressions (CTE) CTE : query cost = 6.95 Left joins : query cost = 11.65 Graphs generated with
  • 38. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 41 8.0 Window Functions https://dev.mysql.com/doc/refman/8.0/en/window-functions.html • Frequently requested feature for data analysis like ranking of data • For each row from a query, perform a calculation using rows related to that row • Non-aggregate window functions that, for each row from a query, perform a calculation using rows related to that row – FIRST_VALUE(), LAST_VALUE(), RANK(), ROW_NUMBER(), ... – https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html • Group (aggregate) functions that operate on sets of values. – MAX(), MIN(), SUM(), AVG(), COUNT(), JSON_ARRAYAGG(), JSON_OBJECTAGG(), ... – https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html Improving Support for Analytics
  • 39. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 42 8.0 Window Functions SELECT ROW_NUMBER() OVER() AS `#`, year, country, product, profit FROM sales ORDER BY country, year, product, profit; • A window function performs an aggregate-like operation on a set of query rows. However, whereas an aggregate operation groups query rows into a single result row, a window function produces a result for each query row: – The row for which function evaluation occurs is called the current row – The query rows related to the current row over which function evaluation occurs comprise the window for the current row +----+------+---------+------------+--------+ | # | year | country | product | profit | +----+------+---------+------------+--------+ | 1 | 2000 | Finland | Computer | 1500 | | 2 | 2000 | Finland | Phone | 100 | | 3 | 2001 | Finland | Phone | 10 | | 4 | 2000 | India | Calculator | 75 | | 5 | 2000 | India | Calculator | 75 | | 6 | 2000 | India | Computer | 1200 | | 7 | 2000 | USA | Calculator | 75 | | 8 | 2000 | USA | Computer | 1500 | | 9 | 2001 | USA | Calculator | 50 | | 10 | 2001 | USA | Computer | 1200 | | 11 | 2001 | USA | Computer | 1500 | | 12 | 2001 | USA | TV | 100 | | 13 | 2001 | USA | TV | 150 | +----+------+---------+------------+--------+
  • 40. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 44 8.0 Window Functions SELECT year, country, product, profit, SUM(profit) OVER() AS total_profit, SUM(profit) OVER(PARTITION BY country) AS country_profit, SUM(profit) OVER(ORDER BY country, year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulativ_sum FROM sales ORDER BY country, year, product, profit; • Cumulative sum +------+---------+------------+--------+--------------+----------------+---------------+ | year | country | product | profit | total_profit | country_profit | cumulativ_sum | +------+---------+------------+--------+--------------+----------------+---------------+ | 2000 | Finland | Computer | 1500 | 7535 | 1610 | 1500 | | 2000 | Finland | Phone | 100 | 7535 | 1610 | 1600 | | 2001 | Finland | Phone | 10 | 7535 | 1610 | 1610 | | 2000 | India | Calculator | 75 | 7535 | 1350 | 1685 | | 2000 | India | Calculator | 75 | 7535 | 1350 | 1760 | | 2000 | India | Computer | 1200 | 7535 | 1350 | 2960 | | 2000 | USA | Calculator | 75 | 7535 | 4575 | 3035 | | 2000 | USA | Computer | 1500 | 7535 | 4575 | 4535 | | 2001 | USA | Calculator | 50 | 7535 | 4575 | 4585 | | 2001 | USA | Computer | 1200 | 7535 | 4575 | 5785 | | 2001 | USA | Computer | 1500 | 7535 | 4575 | 7285 | | 2001 | USA | TV | 100 | 7535 | 4575 | 7385 | | 2001 | USA | TV | 150 | 7535 | 4575 | 7535 | +------+---------+------------+--------+--------------+----------------+---------------+ https://fr.slideshare.net/DagHWanvik/dublin-4x3finalslideshare-80423777
  • 41. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 45 8.0 Window Functions SELECT DISTINCT FIRST_VALUE(value) OVER w AS First, LAST_VALUE(value) OVER w AS Last, SUM(value) OVER w AS Sum, AVG(value) OVER w AS Avg, CAST(ts AS DATE) AS date FROM ts WINDOW w AS ( PARTITION BY CAST(ts AS DATE) ORDER BY ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ); +-------+------+------+----------+------------+ | first | last | sum | avg | date | +-------+------+------+----------+------------+ | 142 | 154 | 609 | 152.2500 | 2018-08-10 | | 158 | 170 | 655 | 163.7500 | 2018-08-11 | | 172 | 249 | 771 | 192.7500 | 2018-08-12 | +-------+------+------+----------+------------+ • Handling Time Series SELECT * FROM ts; +----+-------+---------------------+ | id | value | ts | +----+-------+---------------------+ | 1 | 142 | 2018-08-10 00:00:00 | | 2 | 163 | 2018-08-10 06:00:00 | | 3 | 150 | 2018-08-10 12:00:00 | | 4 | 154 | 2018-08-10 18:00:00 | | 5 | 158 | 2018-08-11 00:00:00 | | 6 | 161 | 2018-08-11 06:00:00 | | 7 | 166 | 2018-08-11 12:00:00 | | 8 | 170 | 2018-08-11 18:00:00 | | 9 | 172 | 2018-08-12 00:00:00 | | 10 | 190 | 2018-08-12 06:00:00 | | 11 | 160 | 2018-08-12 12:00:00 | | 12 | 249 | 2018-08-12 18:00:00 | +----+-------+---------------------+
  • 42. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 46 8.0 Window Functions & JSON SELECT doc FROM cs; +----------------------------------------------------------------------------------------------+ | doc | +----------------------------------------------------------------------------------------------+ | {"id": 1, "ts": "2018-08-10 00:00:00", "_id": "00005bd1ea94000000000000000d", "value": 142} | | {"id": 2, "ts": "2018-08-10 06:00:00", "_id": "00005bd1ea94000000000000000e", "value": 163} | | {"id": 3, "ts": "2018-08-10 12:00:00", "_id": "00005bd1ea94000000000000000f", "value": 150} | | {"id": 4, "ts": "2018-08-10 18:00:00", "_id": "00005bd1ea940000000000000010", "value": 154} | | {"id": 5, "ts": "2018-08-11 00:00:00", "_id": "00005bd1ea940000000000000011", "value": 158} | | {"id": 6, "ts": "2018-08-11 06:00:00", "_id": "00005bd1ea940000000000000012", "value": 161} | | {"id": 7, "ts": "2018-08-11 12:00:00", "_id": "00005bd1ea940000000000000013", "value": 166} | | {"id": 8, "ts": "2018-08-11 18:00:00", "_id": "00005bd1ea940000000000000014", "value": 170} | | {"id": 9, "ts": "2018-08-12 00:00:00", "_id": "00005bd1ea940000000000000015", "value": 172} | | {"id": 10, "ts": "2018-08-12 06:00:00", "_id": "00005bd1ea940000000000000016", "value": 190} | | {"id": 11, "ts": "2018-08-12 12:00:00", "_id": "00005bd1ea940000000000000017", "value": 160} | | {"id": 12, "ts": "2018-08-12 18:00:00", "_id": "00005bd1ea940000000000000018", "value": 249} | +----------------------------------------------------------------------------------------------+ • Handling Time Series data in a JSON column or from a collection
  • 43. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 47 8.0 Window Functions & JSON SELECT DISTINCT FIRST_VALUE(value) OVER w AS First, LAST_VALUE(value) OVER w AS Last, SUM(value) OVER w AS Sum, AVG(value) OVER w AS Avg, CAST(ts AS DATE) AS date FROM cs, JSON_TABLE(doc, "$" COLUMNS (id int PATH "$.id", value int PATH "$.value", ts timestamp PATH "$.ts")) AS tcs WINDOW w AS ( PARTITION BY CAST(ts AS DATE) ORDER BY ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ); +-------+------+------+----------+------------+ | first | last | sum | avg | date | +-------+------+------+----------+------------+ | 142 | 154 | 609 | 152.2500 | 2018-08-10 | | 158 | 170 | 655 | 163.7500 | 2018-08-11 | | 172 | 249 | 771 | 192.7500 | 2018-08-12 | +-------+------+------+----------+------------+ • Handling Time Series data in a JSON column or from a collection
  • 44. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 48 https://dev.mysql.com/doc/refman/8.0/en/innodb-locking-reads.html#innodb-locking-reads-nowait-skip-locked SELECT seat_no FROM seats JOIN seat_rows USING ( row_no ) WHERE seat_no IN (3,4) AND seat_rows.row_no IN (12) AND booked = 'NO' FOR UPDATE OF seats SKIP LOCKED FOR SHARE OF seat_rows NOWAIT; • Locking Read Concurrency with NOWAIT and SKIP LOCKED 8.0 Better Handling Hot Row Contention 1/2 SKIP LOCKED / NOWAIT Non deterministically skip over locked rows Error immediately if a row is already locked
  • 45. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 49 -- Session 1 START TRANSACTION; SELECT * FROM t WHERE i = 2 FOR UPDATE; +---+ | i | +---+ | 2 | +---+ 8.0 Better Handling Hot Row Contention 2/2 SKIP LOCKED / NOWAIT -- Session 2 START TRANSACTION; SELECT * FROM t WHERE i = 2 FOR UPDATE NOWAIT; ERROR 3572 (HY000): Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set. -- Session 3 START TRANSACTION; SELECT * FROM t FOR UPDATE SKIP LOCKED; +---+ | i | +---+ | 1 | | 3 | +---+
  • 46. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0 UUID and Bit-wise Improvements • Functions to convert UUID to and from binary: – UUID_TO_BIN() – BIN_TO_UUID() – plus IS_UUID() • Binary format is now smaller and insert-order efficient: 11e678fe53303f87a4778c89a52c4f3b 53303f87-78fe-11e6-a477-8c89a52c4f3bFrom VARCHAR(36) To VARBINARY(16) • Bit-wise operations on binary data types. • Bit-wise operations on binary data types. – Designed with IPv6 in mind: ● INET6_ATON(address) & INET6_ATON(network) 50
  • 47. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0 SQL Functional Indexes • Add the possibility to create functional indexes in MySQL – Implemented as indexed hidden generated columns 51 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)); https://dev.mysql.com/worklog/task/?id=1075 Support for functional index (8.0.13+)
  • 48. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0 SQL Default Value • Add the capability to use functions as default values as well as allowing default values for GIS and JSON datatypes – The most common use case would be to emulate a UUID-like auto_increment 52 https://dev.mysql.com/worklog/task/?id=9418 Permit default value to be a function or expression (8.0.13+) CREATE TABLE t0 ( id BINARY(16) DEFAULT (uuid_to_bin(uuid())), doc JSON DEFAULT ('[]') ); INSERT INTO t0 () VALUES (); Query OK, 1 row affected (0,11 sec) SELECT bin_to_uuid(id), doc FROM t0; +--------------------------------------+------+ | bin_to_uuid(id) | doc | +--------------------------------------+------+ | f6d56292-d8a6-11e8-a42f-dc53609b8b8d | [] | +--------------------------------------+------+
  • 49. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | DBAs/OPS Requests 53
  • 50. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 54 8.0 Features for DBAs • MySQL 8.0 InnoDB Cluster • Instant Add Column • Invisible indexes • Persist Configuration • Upgrade Checker utility • GIS Improvement • Prohibits table w/o primary Key • Histograms • Improved Security • Improve Performance
  • 51. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Virtually all organizations require their most critical systems to be highly available 55 100% High Availability
  • 52. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | InnoDB Cluster 56 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate “High Availability becomes a core first class feature of MySQL!” https://mysqlserverteam.com/mysql-innodb-cluster-8-0-ga-is-available-now/
  • 53. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Shell: DBA Admin API • The global variable 'dba' is used to access the MySQL AdminAPI • JS> dba.help() • Perform DBA operations – Manage MySQL InnoDB clusters • Create clusters • Validate MySQL instances • Configure MySQL instances • Get cluster info • Modify clusters • and much more ... App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate 57
  • 54. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Group Replication: Database HA • Group Replication library – Implementation of Replicated Database State Machine • MySQL GCS is based on our home-grown Paxos implementation – Provides virtually synchronous replication for MySQL 5.7+ • Guarantees eventual consistency – Automates operations • Conflict detection and resolution • Failure detection, fail-over, recovery • Group membership management and reconfiguration “Multi-master update anywhere replication plugin for MySQL with built-in conflict detection and resolution, automatic distributed recovery, and group membership.” 58 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate
  • 55. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0: Alter Table – Instant Add Column • Contribution from Tencent Games – Only a metadata change – No copying of data – Smaller final data size – Forward compatibility with old data file • ALTER TABLE ... ADD COLUMN c, ALGORITHM = INSTANT • Supports DYNAMIC/COMPACT/REDUNDANT row formats 59
  • 56. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 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 60 Feature Request from 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; e.g. Soft Delete
  • 57. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0: Persist Configuration 61 Cloud Friendly • Persist Global Server Variables  SET PERSIST max_connections = 500 ; • Examples Inlude :  Offline_mode  Read_Only • Requires no filesystem access • Inludes timestamp and change user
  • 58. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • Highly Accurate  Now better than competitor databases • High Performance • Simple – No extra configuration or installation  Completely built in and ready to use • Powerful  Full Geography Support  Projected – Flat/Across 2 dimensions  Geographic – Spheroid  Details  5107 predefined SRSs from the EPSG Dataset 9.2  4628 projected  479 gegraphic 8.0: GIS Improvements 62 https://mysqlserverteam.com/spatial-reference-systems-in-mysql-8-0/
  • 59. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0 Prohibits Tables w/o Primary Key • New system variable : sql_require_primary_key • Cause CREATE or ALTER statements that would yield a table without primary key, to fail • Tables without primary keys may cause performance problems • https://dev.mysql.com/worklog/task/?id=11807 63 https://dev.mysql.com/worklog/task/?id=9418 Option to Disallow Tables without a Primary Key (8.0.13+)
  • 60. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8.0: InnoDB Improvements • Document Store/JSON – More efficient BLOBs, up to 4x improvement on update – Better performance for both small and large BLOBs • New Scalable WAL – Lock free design • Atomic DDL • Persistent Auto Increment • Contention Aware Transaction Scheduling (CATS) – Contribution from University of Michigan • Removed IO bottlenecks – More scalable design 64
  • 61. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Performance Improvements 65
  • 62. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | New! Performance Improvements • Improved Query Consistency – Histograms – Improved Cost Model • Faster Table/Range Scans 66 • Parallel Replication • UTF8MB4 • Information Schema • Performance Schema Indexes http://dimitrik.free.fr/blog/
  • 63. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 67 OS : Oracle Linux 7.4 CPU : 48cores-HT Intel Skylake 2.7Ghz (2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU) RAM: 256GB Storage : x2 Intel Optane flash devices (Intel (R) Optane (TM) SSD P4800X Series) 2x Faster than MySQL 5.7 8.0: SysBench IO Bound Read Only (Point Selects)
  • 64. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 68 OS : Oracle Linux 7.4 CPU : 48cores-HT Intel Skylake 2.7Ghz (2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU) RAM: 256GB Storage : x2 Intel Optane flash devices (Intel (R) Optane (TM) SSD P4800X Series) 2x Faster than MySQL 5.7 8.0: SysBench Read/Write (Update NoKey)
  • 65. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Column statistics 8.0: Histograms Feature Request by DBAs• Provides the optimizer with information about column value distribution • Better query plans – More consistent QEP for cases when data is skewed – Lower cost to maintain than an index • To create/recalculate histogram for a column: – ANALYZE TABLE table UPDATE HISTOGRAM ON column WITH n BUCKETS; • May use sampling – Sample size is based on available memory ( histogram_generation_max_mem_size ) • Automatically chooses between two histogram types: – Singleton: One value per bucket – Equi-height: Multiple value per bucket 69
  • 66. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Improved to consider buffer pool fit 8.0: Optimizer Cost Model Feature Request by DBAs• Storage engines : – Estimate for how much of data and indexes are in memory buffer – Estimate for hit rate for memory buffer • Optimizer cost model : – Take into account wether data is already in memory or need to be read from disk 70
  • 67. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 71 Improved to consider buffer pool fit 8.0: Optimizer Cost Model Feature Request by DBAs In Memory innodb_buffer_pool=32G Disk Bond innodb_buffer_pool=1G Plan A 5.8 secs 9 min 47 secs Plan B 77.5 secs 3 min 49 secs In Memory innodb_buffer_pool=32G Disk Bond innodb_buffer_pool=1G MySQL 5.6 Plan B MySQL 5.7 Plan A MySQL 8.0 Plan A Plan B
  • 68. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | System Configuration : Oracle Linux 7, Intel(R) Xeon(R) CPU E7-4860 2.27GHz 40 cores-HT No Resource Group (40 Cores Shared) With Resource Group (40 Cores for Select) (10 Cores for Update RG) 72 Control resource usage for DML load 8.0 Resource Group Example https://dev.mysql.com/doc/refman/8.0/en/resource-groups.html
  • 69. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 7 3 8.0: All these features plus… • Source code now documented with Doxygen • Plugin Infrastructure! • Expanded GIS Support • Expanded Query Hints Support • Improved Scan Query Performance • Improved BLOB Storage • Improved Memcached Interface • Cost Model Improvements • Scalability Improvements • Atomicity in Privileges • Parser Refactoring • Improvements to Temporary Tables • C++11 and Toolchain Improvements • GTID_PURGED always settable • Persistent Auto Increment • Native InnoDB Data dictionary • Improved Information Schema performance • SQL Grouping Function • Optimizer Trace detailed sort statistics • Descending Indexes • Smaller Package Downloads • JSON Aggregate, Pretty print functions • JSON performance improvements • Expanded Query Hints • Improved usability of cost constant configuration • Group Replication in 8.0 • Transaction Save Point support in Group Replication • Improved Replication Applier Lag Statistics in Performance Schema • Per Multi-source Channel Replication Filters • Atomic DDL extended to the Binary Log • Performance Improvements on the Replication Applier • Parallel Replication Applier Policy • Binary Log Management Enhancements • Additional Metadata Into the Binary Log • Improve SELECT COUNT(*) performance • Multiple addresses for --bind-address • Support for BLOBs in temp table engine • ...
  • 70. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 74 • DocStore – SQL + NoSQL = MySQL • InnoDB Cluster – HA made easy • SQL • JSON • GIS 8.0 – Innovating and Evolving • Replication • Reliability • Observability • Manageability • Security • Performance • Scalability
  • 71. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Resources – MySQL Blogs 1/3 75 • MySQL Server Team’s blog – http://mysqlserverteam.com/ • MySQL High Availability Team’s blog – http://mysqlhighavailability.com/ • MySQL Release Engineering Blog – https://mysqlrelease.com/ • MySQL Dev Team Blog – https://insidemysql.com/ • MySQL Enterprise Team Blogs – https://blogs.oracle.com/mysql/ • Lefred’s blog (MySQL Community Manager) – http://lefred.be/ • Olivier Dasini’s blog – http://dasini.net/blog/
  • 72. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Resources – MySQL Blogs 2/3 76 • MySQL Document Store – https://dev.mysql.com/doc/x-devapi-userguide/en/ – https://github.com/mysql/mysql-connector-nodejs – https://www.npmjs.com/package/@mysql/xdevapi – https://dev.mysql.com/doc/refman/8.0/en/document-store.html – https://dev.mysql.com/doc/x-devapi-userguide/en/ – https://dev.mysql.com/doc/dev/connector-nodejs/8.0/ – https://www.mysql.com/news-and-events/web-seminars/mysql-document-store-and-node-js/ • MySQL Performance by Dimitri – http://dimitrik.free.fr/blog/archives/2018/04/mysql-performance-over-18m-qps-with-80-ga-on-2s-skylake.html – http://dimitrik.free.fr/blog/archives/2018/04/mysql-performance-80-and-utf8-impact.html • MySQL InnoDB Cluster – https://mysqlserverteam.com/mysql-innodb-cluster-8-0-ga-is-available-now/ – https://mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-ga-release/ – https://mysqlserverteam.com/mysql-innodb-cluster-8-0-a-hands-on-tutorial/
  • 73. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Resources – MySQL Blogs 3/3 77 • Common Table Expressions (CTE) – http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes/ – http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes-part-two-how-to-generate-series/ – http://mysqlserverteam.com/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes-part-three-hierarchies/ – http://mysqlserverteam.com/mysql-8-0-1-recursive-common-table-expressions-in-mysql-ctes-part-four-depth-first-or-breadth-first-traversal- transitive-closure-cycle-avoidance/ • Window Functions – http://mysqlserverteam.com/mysql-8-0-2-introducing-window-functions/ – https://mysqlserverteam.com/row-numbering-ranking-how-to-use-less-user-variables-in-mysql-queries/ – https://fr.slideshare.net/DagHWanvik/dublin-4x3finalslideshare-80423777 • Security – https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/ – https://mysqlserverteam.com/mysql-8-0-4-openssl-and-mysql-community-edition/ – http://lefred.be/content/mysql-8-0-listing-roles/ – https://dev.mysql.com/doc/refman/8.0/en/password-management.html • Upgrade from 5.7 to 8.0 – https://mysqlserverteam.com/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/ – https://mysqlserverteam.com/upgrading-to-mysql-8-0-here-is-what-you-need-to-know/
  • 74. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Thanks for using MySQL!