SlideShare a Scribd company logo
MySQL 8.0 New Features Overview
for cPanel Customers
Dave Stokes
Community Manager, North America
MySQL Community Team
Copyright © 2019 Oracle and/or its affiliates.
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, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A
detailed discussion of these factors and other risks that affect our business is contained in Oracle’s
Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K
and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or
on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as
of September 2019 and Oracle undertakes no duty to update any statement in light of new information
or future events.
Safe Harbor
Copyright © 2019 Oracle and/or its affiliates.
MySQL 8.0 New Features Overview
for cPanel Customers
Dave Stokes
Community Manager, North America
MySQL Community Team
Copyright © 2019 Oracle and/or its affiliates.
Our Goal
MySQL 8.0 was a big advancement over
the previous version, MySQL 5.7 and this
presentation is a general overview of some
of the new features.
There are many new facets not covered by
this presentation and hopefully you will be
able to explore them later.
Copyright © 2019 Oracle and/or its affiliates.
MySQL 5.6
If you are using MySQL 5.6 please note that
it reaches End of Life status for support and
updates in February 2021.
Please upgrade if you are using this version
of MySQL!
Copyright © 2019 Oracle and/or its affiliates.
What is MySQL?
• Relational Database Management System
• GPLv2 licensed Community Edition
• Licensed Enterprise Edition
Monitoring software, improved backup, at rest encryption, data masking, db firewall, key
chain management, and support
• Also a NoSQL JSON Document Store Database
• Also language connectors, Router, Shell, InnoDB Cluster
• And more!
Copyright © 2019 Oracle and/or its affiliates.
25 Years old!!
What Happened to MySQL 6.0 and 7.0????
There was an early MySQL 6.0 that withered on the vine and
software was included in the 5.0 series
NDB Cluster has used the 7 series for many years
So engineering thought we earned the 8.0 series which
became generally available in April 2018
My Top Seven
Features of
MySQL 8.0!
1.Data Dictionary
All the metadata is stored within the database itself. No more
pletoria of little files under /var/lib/mysql -- saves inodes, disk
space, and ‘rm accidents’.
Good new: You can now have millions of tables in a schema.
Bad news: You can now have millions of tables in a schema.
2. Better SQL
1. Windowing Functions
2. Lateral Derived Tables
3. Common Table Expressions
4. ROW & TABLE
SELECT date, amount,
sum(amount)
OVER w AS ‘sum’
FROM payments
WINDOW w AS
(ORDER BY date
RANGE BETWEEN
INTERVAL 1 WEEK PRECEDING
AND CURRENT ROW)
ORDER BY date;
Windowing Functions are for
analytics of grouped rows.
Grouping can be by date/time or like
rows.
SELECT Name,
Population,
District,
x.cc
FROM city,
LATERAL (SELECT Code AS cc
FROM country
WHERE
city.CountryCode = Code) AS x
WHERE District = 'Texas'
ORDER BY name;
Lateral derived tables
for easier subqueries
WITH
cte1 AS (SELECT a, b FROM table1),
cte2 AS (SELECT c, d FROM table2)
SELECT b, d
FROM cte1
JOIN cte2 WHERE cte1.a = cte2.c;
Common Table
Expressions (CTE)
for easier subqueries
CTEs can be joined &
referenced multiple
times
3. Optimizer & Parser
1. Descending indexes
2. Optimizer trace output now includes more information about filesort operations,
such as key and payload size and why addon fields are not packed.
3. The optimizer now supports hints that enable specifying the order in which to
join tables.
4. New sys variable to include estimates for delete marked records includes delete
marked records in calculation of table and index statistics. This work was done
to overcome a problem with "wrong" statistics where an uncommitted transaction
has deleted all rows in the table.
5. NOWAIT and SKIPPED LOCKED to bypass locked records
START TRANSACTION;
SELECT * FROM seats
WHERE seat_rows.row_no BETWEEN 2 AND 3
AND booked = 'NO'
FOR UPDATE SKIP LOCKED;
...
COMMIT;
START TRANSACTION
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;
SKIPPED LOCKED
and NOWAIT mean no
waiting around for
other queries!
If the records you want
are already locked you
can search for others
CATS
The CATS algorithm is based on a simple intuition: not all
transactions are equal, and not all objects are equal.
When a transaction already has a lock on many popular
objects, it should get priority when it requests a new lock.
In other words, unblocking such a transaction will indirectly
contribute to unblocking many more transactions in the
system, which means higher throughput and lower latency
overall.
4. UTF8MB4
Previously UTF8 was actually UTF8MB3
● 3 bytes, no emojis
● Supplementary multilingual plane support limited
● No CJK Unified Ideographs Extension B are in supplementary ideographic
plane
Upgrade problem expected!
utf8mb4_0900_ai_ci:
0900 refers to Unicode Collation Algorithm version.
- ai refers to accent insensitive.
- ci refers to case insensitive.
And yes, you get all
those special *ahem*
graphics too!
5. Invisible Indexes
- An invisible index is not used by the optimizer at all, but is otherwise
maintained normally. Indexes are visible by default. Invisible indexes make
it possible to test the effect of removing an index on query performance,
without making a destructive change that must be undone should the
index turn out to be required
- ALTER TABLE t1 ALTER INDEX i_idx INVISIBLE;
- ALTER TABLE t1 ALTER INDEX i_idx VISIBLE;
6. Improved JSON Support
- JSON became a data type in MySQL 5.7
- Used for JSON formatted data, high mutable data, and reducing many to
many joins
- Many JSON functions can be be used to turn relational data into JSON
- Is the basis for the new X DevAPI and the MySQL Document Store NoSQL
- New CRUD based API
- No need to set up relations, normalize data, or build indexes
- No SQL Syntax
- Not at ORM and built on Google Protobufs
- You can specify required keys & ranges, ala JSON-Schema.org
JSON_TABLE() makes your UNstructured data temporarily structured for SQL Processing
mysql> select aaaa.name, aaaa.ordinal, aaaa.Grading FROM restaurants,
json_table(doc, "$" COLUMNS(
name char(50) path "$.name",
style varchar(50) path "$.cuisine",
NESTED PATH '$.grades[*]'
COLUMNS (
ordinal FOR ORDINALITY,
Grading char(10) path "$.grade",
Score INT path "$.score"))
)
as aaaa limit 5;
+--------------------------------+---------+---------+
| name | ordinal | Grading |
+--------------------------------+---------+---------+
| Morris Park Bake Shop | 1 | A |
| Morris Park Bake Shop | 2 | A |
| Morris Park Bake Shop | 3 | A |
| Morris Park Bake Shop | 4 | A |
| Morris Park Bake Shop | 5 | B |
JSON_TABLE() makes your structured data temporarily structured for SQL Processing
#!/usr/bin/php
<?PHP
// Connection parameters
$user = 'root'; $passwd = 'hidave'; $host = 'localhost'; $port = '33060';
$connection_uri = 'mysqlx://'.$user.':'.$passwd.'@'.$host.':'.$port;
// Connect as a Node Session
$nodeSession = mysql_xdevapigetNodeSession($connection_uri);
// "USE world_x"
$schema = $nodeSession->getSchema("world_x");
// Specify collection to use
$collection = $schema->getCollection("countryinfo");
// Query the Document Store
$result = $collection->find('_id = "USA"')->fields(['Name as Country','geography as
Geo','geography.Region'])->execute();
// Fetch/Display data
$data = $result->fetchAll();
7. Histograms
A histogram is an approximation of the data distribution for a column. It can tell you with a reasonably
accuray whether your data is skewed or not, which in turn will help the database server understand the nature
of data it contains.
Histograms comes in many different flavours, and in MySQL we have chosen to support two different types:
The “singleton” histogram and the “equi-height” histogram. Common for all histogram types is that they split
the data set into a set of “buckets”, and MySQL automatically divides the values into buckets, and will also
automatically decide what type of histogram to create.
Note that the number of buckets must be specified, and can be in the range from 1 to 1024. How many
buckets you should choose for your data set depends on several factors; how many distinct values do you
have, how skewed is your data set, how high accuracy do you need etc. However, after a certain amount of
buckets the increased accuracy is rather low. So we suggest to start at a lower number such as 32, and
increase it if you see that it doesn’t fit your needs.
That is my Top Seven!!
But I am leaving out a whole lot more!!
Some of the stuff I did not cover
InnoDB Cluster
Replica Groups
Router
Clone plug-in
MySQL Shell
speaks Python,
JS & SQL
Admin tool
Parallel Bulk
Loader
JSON/CSV
Hash Joins
Dual Passwords
zstd compression
Explain Analyze
And much more!
Thank You
Dave Stokes
Community Manager
MySQL Community Team
David.Stokes @ Oracle.com
@Stoker
ElephantDolphin. blogger.com
Copyright © 2019 Oracle and/or its affiliates.

More Related Content

PPTX
Confoo 2021 - MySQL Indexes & Histograms
PPTX
A Step by Step Introduction to the MySQL Document Store
PDF
Datacon LA - MySQL without the SQL - Oh my!
PDF
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
PDF
Dutch PHP Conference 2021 - MySQL Indexes and Histograms
PDF
Longhorn PHP - MySQL Indexes, Histograms, Locking Options, and Other Ways to ...
PPTX
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
PDF
Json within a relational database
Confoo 2021 - MySQL Indexes & Histograms
A Step by Step Introduction to the MySQL Document Store
Datacon LA - MySQL without the SQL - Oh my!
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
Dutch PHP Conference 2021 - MySQL Indexes and Histograms
Longhorn PHP - MySQL Indexes, Histograms, Locking Options, and Other Ways to ...
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
Json within a relational database

What's hot (20)

PDF
MySQL Replication Update - DEbconf 2020 presentation
PDF
MySQL 8.0 New Features -- September 27th presentation for Open Source Summit
PPTX
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
PPTX
Discover the Power of the NoSQL + SQL with MySQL
PDF
MySQL 8.0 Operational Changes
PDF
Open Source World June '21 -- JSON Within a Relational Database
PPTX
Confoo 2021 -- MySQL New Features
PDF
Database basics for new-ish developers -- All Things Open October 18th 2021
PDF
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
PDF
MySQL 8 Server Optimization Swanseacon 2018
PDF
MySQL Indexes and Histograms - RMOUG Training Days 2022
PPTX
Validating JSON -- Percona Live 2021 presentation
PDF
PNWPHP -- What are Databases so &#%-ing Difficult
PPTX
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
PPTX
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
PPTX
Oracle Database 12.1.0.2 New Features
PPTX
ConFoo MySQL Replication Evolution : From Simple to Group Replication
MySQL Replication Update - DEbconf 2020 presentation
MySQL 8.0 New Features -- September 27th presentation for Open Source Summit
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
Discover the Power of the NoSQL + SQL with MySQL
MySQL 8.0 Operational Changes
Open Source World June '21 -- JSON Within a Relational Database
Confoo 2021 -- MySQL New Features
Database basics for new-ish developers -- All Things Open October 18th 2021
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
MySQL 8 Server Optimization Swanseacon 2018
MySQL Indexes and Histograms - RMOUG Training Days 2022
Validating JSON -- Percona Live 2021 presentation
PNWPHP -- What are Databases so &#%-ing Difficult
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Oracle Database 12.1.0.2 New Features
ConFoo MySQL Replication Evolution : From Simple to Group Replication
Ad

Similar to cPanel now supports MySQL 8.0 - My Top Seven Features (20)

PDF
MySQL New Features -- Sunshine PHP 2020 Presentation
PPTX
MySQL 8.0 Featured for Developers
PDF
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
PPTX
MySQL 8.0 from December London Open Source Database Meetup
PPT
Ebook10
PPT
Sql interview question part 10
PDF
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
PDF
PHP Detroit -- MySQL 8 A New Beginning (updated presentation)
PDF
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
PPT
Os Owens
PPTX
Ebook6
PPTX
Sql interview-question-part-6
PPTX
Ebook6
PPTX
Sql interview-question-part-6
PPTX
Sql interview question part 6
PPTX
android sqlite
DOC
Ibm redbook
PPTX
Sql interview question part 5
PPTX
Ebook5
PDF
Ohio Linux Fest -- MySQL's NoSQL
MySQL New Features -- Sunshine PHP 2020 Presentation
MySQL 8.0 Featured for Developers
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
MySQL 8.0 from December London Open Source Database Meetup
Ebook10
Sql interview question part 10
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
PHP Detroit -- MySQL 8 A New Beginning (updated presentation)
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
Os Owens
Ebook6
Sql interview-question-part-6
Ebook6
Sql interview-question-part-6
Sql interview question part 6
android sqlite
Ibm redbook
Sql interview question part 5
Ebook5
Ohio Linux Fest -- MySQL's NoSQL
Ad

More from Dave Stokes (10)

PDF
Midwest PHP Presentation - New MSQL Features
PDF
Data Love Conference - Window Functions for Database Analytics
PPTX
Discover The Power of NoSQL + MySQL with MySQL
PDF
Confoo 202 - MySQL Group Replication and ReplicaSet
PPTX
MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019
PPTX
Upgrading to MySQL 8.0 webinar slides November 27th, 2019
PDF
Windowing Functions - Little Rock Tech Fest 2019
PDF
Oracle CodeOne Foreign Keys Support in MySQL 8.0
PDF
MySQL Without the SQL - Oh My! August 2nd presentation at Mid Atlantic Develo...
PDF
MySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
Midwest PHP Presentation - New MSQL Features
Data Love Conference - Window Functions for Database Analytics
Discover The Power of NoSQL + MySQL with MySQL
Confoo 202 - MySQL Group Replication and ReplicaSet
MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019
Upgrading to MySQL 8.0 webinar slides November 27th, 2019
Windowing Functions - Little Rock Tech Fest 2019
Oracle CodeOne Foreign Keys Support in MySQL 8.0
MySQL Without the SQL - Oh My! August 2nd presentation at Mid Atlantic Develo...
MySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference

Recently uploaded (20)

PPTX
Leprosy and NLEP programme community medicine
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PDF
Oracle OFSAA_ The Complete Guide to Transforming Financial Risk Management an...
PDF
Mega Projects Data Mega Projects Data
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PDF
annual-report-2024-2025 original latest.
PPT
Predictive modeling basics in data cleaning process
PPTX
modul_python (1).pptx for professional and student
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PDF
Introduction to Data Science and Data Analysis
PDF
Introduction to the R Programming Language
PPT
DATA COLLECTION METHODS-ppt for nursing research
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
PPTX
SAP 2 completion done . PRESENTATION.pptx
Leprosy and NLEP programme community medicine
Qualitative Qantitative and Mixed Methods.pptx
STERILIZATION AND DISINFECTION-1.ppthhhbx
Oracle OFSAA_ The Complete Guide to Transforming Financial Risk Management an...
Mega Projects Data Mega Projects Data
Data_Analytics_and_PowerBI_Presentation.pptx
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
annual-report-2024-2025 original latest.
Predictive modeling basics in data cleaning process
modul_python (1).pptx for professional and student
IBA_Chapter_11_Slides_Final_Accessible.pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
Introduction to Data Science and Data Analysis
Introduction to the R Programming Language
DATA COLLECTION METHODS-ppt for nursing research
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
SAP 2 completion done . PRESENTATION.pptx

cPanel now supports MySQL 8.0 - My Top Seven Features

  • 1. MySQL 8.0 New Features Overview for cPanel Customers Dave Stokes Community Manager, North America MySQL Community Team Copyright © 2019 Oracle and/or its affiliates.
  • 2. 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, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.
  • 3. MySQL 8.0 New Features Overview for cPanel Customers Dave Stokes Community Manager, North America MySQL Community Team Copyright © 2019 Oracle and/or its affiliates.
  • 4. Our Goal MySQL 8.0 was a big advancement over the previous version, MySQL 5.7 and this presentation is a general overview of some of the new features. There are many new facets not covered by this presentation and hopefully you will be able to explore them later. Copyright © 2019 Oracle and/or its affiliates.
  • 5. MySQL 5.6 If you are using MySQL 5.6 please note that it reaches End of Life status for support and updates in February 2021. Please upgrade if you are using this version of MySQL! Copyright © 2019 Oracle and/or its affiliates.
  • 6. What is MySQL? • Relational Database Management System • GPLv2 licensed Community Edition • Licensed Enterprise Edition Monitoring software, improved backup, at rest encryption, data masking, db firewall, key chain management, and support • Also a NoSQL JSON Document Store Database • Also language connectors, Router, Shell, InnoDB Cluster • And more! Copyright © 2019 Oracle and/or its affiliates. 25 Years old!!
  • 7. What Happened to MySQL 6.0 and 7.0???? There was an early MySQL 6.0 that withered on the vine and software was included in the 5.0 series NDB Cluster has used the 7 series for many years So engineering thought we earned the 8.0 series which became generally available in April 2018
  • 8. My Top Seven Features of MySQL 8.0!
  • 9. 1.Data Dictionary All the metadata is stored within the database itself. No more pletoria of little files under /var/lib/mysql -- saves inodes, disk space, and ‘rm accidents’. Good new: You can now have millions of tables in a schema. Bad news: You can now have millions of tables in a schema.
  • 10. 2. Better SQL 1. Windowing Functions 2. Lateral Derived Tables 3. Common Table Expressions 4. ROW & TABLE
  • 11. SELECT date, amount, sum(amount) OVER w AS ‘sum’ FROM payments WINDOW w AS (ORDER BY date RANGE BETWEEN INTERVAL 1 WEEK PRECEDING AND CURRENT ROW) ORDER BY date; Windowing Functions are for analytics of grouped rows. Grouping can be by date/time or like rows.
  • 12. SELECT Name, Population, District, x.cc FROM city, LATERAL (SELECT Code AS cc FROM country WHERE city.CountryCode = Code) AS x WHERE District = 'Texas' ORDER BY name; Lateral derived tables for easier subqueries
  • 13. WITH cte1 AS (SELECT a, b FROM table1), cte2 AS (SELECT c, d FROM table2) SELECT b, d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; Common Table Expressions (CTE) for easier subqueries CTEs can be joined & referenced multiple times
  • 14. 3. Optimizer & Parser 1. Descending indexes 2. Optimizer trace output now includes more information about filesort operations, such as key and payload size and why addon fields are not packed. 3. The optimizer now supports hints that enable specifying the order in which to join tables. 4. New sys variable to include estimates for delete marked records includes delete marked records in calculation of table and index statistics. This work was done to overcome a problem with "wrong" statistics where an uncommitted transaction has deleted all rows in the table. 5. NOWAIT and SKIPPED LOCKED to bypass locked records
  • 15. START TRANSACTION; SELECT * FROM seats WHERE seat_rows.row_no BETWEEN 2 AND 3 AND booked = 'NO' FOR UPDATE SKIP LOCKED; ... COMMIT; START TRANSACTION 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; SKIPPED LOCKED and NOWAIT mean no waiting around for other queries! If the records you want are already locked you can search for others
  • 16. CATS The CATS algorithm is based on a simple intuition: not all transactions are equal, and not all objects are equal. When a transaction already has a lock on many popular objects, it should get priority when it requests a new lock. In other words, unblocking such a transaction will indirectly contribute to unblocking many more transactions in the system, which means higher throughput and lower latency overall.
  • 17. 4. UTF8MB4 Previously UTF8 was actually UTF8MB3 ● 3 bytes, no emojis ● Supplementary multilingual plane support limited ● No CJK Unified Ideographs Extension B are in supplementary ideographic plane Upgrade problem expected! utf8mb4_0900_ai_ci: 0900 refers to Unicode Collation Algorithm version. - ai refers to accent insensitive. - ci refers to case insensitive.
  • 18. And yes, you get all those special *ahem* graphics too!
  • 19. 5. Invisible Indexes - An invisible index is not used by the optimizer at all, but is otherwise maintained normally. Indexes are visible by default. Invisible indexes make it possible to test the effect of removing an index on query performance, without making a destructive change that must be undone should the index turn out to be required - ALTER TABLE t1 ALTER INDEX i_idx INVISIBLE; - ALTER TABLE t1 ALTER INDEX i_idx VISIBLE;
  • 20. 6. Improved JSON Support - JSON became a data type in MySQL 5.7 - Used for JSON formatted data, high mutable data, and reducing many to many joins - Many JSON functions can be be used to turn relational data into JSON - Is the basis for the new X DevAPI and the MySQL Document Store NoSQL - New CRUD based API - No need to set up relations, normalize data, or build indexes - No SQL Syntax - Not at ORM and built on Google Protobufs - You can specify required keys & ranges, ala JSON-Schema.org
  • 21. JSON_TABLE() makes your UNstructured data temporarily structured for SQL Processing mysql> select aaaa.name, aaaa.ordinal, aaaa.Grading FROM restaurants, json_table(doc, "$" COLUMNS( name char(50) path "$.name", style varchar(50) path "$.cuisine", NESTED PATH '$.grades[*]' COLUMNS ( ordinal FOR ORDINALITY, Grading char(10) path "$.grade", Score INT path "$.score")) ) as aaaa limit 5; +--------------------------------+---------+---------+ | name | ordinal | Grading | +--------------------------------+---------+---------+ | Morris Park Bake Shop | 1 | A | | Morris Park Bake Shop | 2 | A | | Morris Park Bake Shop | 3 | A | | Morris Park Bake Shop | 4 | A | | Morris Park Bake Shop | 5 | B |
  • 22. JSON_TABLE() makes your structured data temporarily structured for SQL Processing #!/usr/bin/php <?PHP // Connection parameters $user = 'root'; $passwd = 'hidave'; $host = 'localhost'; $port = '33060'; $connection_uri = 'mysqlx://'.$user.':'.$passwd.'@'.$host.':'.$port; // Connect as a Node Session $nodeSession = mysql_xdevapigetNodeSession($connection_uri); // "USE world_x" $schema = $nodeSession->getSchema("world_x"); // Specify collection to use $collection = $schema->getCollection("countryinfo"); // Query the Document Store $result = $collection->find('_id = "USA"')->fields(['Name as Country','geography as Geo','geography.Region'])->execute(); // Fetch/Display data $data = $result->fetchAll();
  • 23. 7. Histograms A histogram is an approximation of the data distribution for a column. It can tell you with a reasonably accuray whether your data is skewed or not, which in turn will help the database server understand the nature of data it contains. Histograms comes in many different flavours, and in MySQL we have chosen to support two different types: The “singleton” histogram and the “equi-height” histogram. Common for all histogram types is that they split the data set into a set of “buckets”, and MySQL automatically divides the values into buckets, and will also automatically decide what type of histogram to create. Note that the number of buckets must be specified, and can be in the range from 1 to 1024. How many buckets you should choose for your data set depends on several factors; how many distinct values do you have, how skewed is your data set, how high accuracy do you need etc. However, after a certain amount of buckets the increased accuracy is rather low. So we suggest to start at a lower number such as 32, and increase it if you see that it doesn’t fit your needs.
  • 24. That is my Top Seven!! But I am leaving out a whole lot more!!
  • 25. Some of the stuff I did not cover InnoDB Cluster Replica Groups Router Clone plug-in MySQL Shell speaks Python, JS & SQL Admin tool Parallel Bulk Loader JSON/CSV Hash Joins Dual Passwords zstd compression Explain Analyze And much more!
  • 26. Thank You Dave Stokes Community Manager MySQL Community Team David.Stokes @ Oracle.com @Stoker ElephantDolphin. blogger.com Copyright © 2019 Oracle and/or its affiliates.