Safe Harbor Agreement
THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL PRODUCT DIRECTION. IT IS INTENDED FOR INFORMATION PURPOSES ONLY, AND MAY NOT BE INCORPORATED INTO ANY CONTRACT. IT IS NOT A COMMITMENT TO DELIVER ANY MATERIAL, CODE, OR FUNCTIONALITY, AND SHOULD NOT BE RELIED UPON IN MAKING PURCHASING DECISIONS. THE DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES OR FUNCTIONALITY DESCRIBED FOR ORACLE'S PRODUCTS REMAINS AT THE SOLE DISCRETION OF ORACLE.
2
Hello!I AM Dave Stokes
I am here because I love to give
presentations & RMOUG.
You can find me at:
@stoker
Elephantanddolphin.blogger.com
Opensourcedba.wordpress.com
3
Why MySQL 8??
▪ Current GA is 5.7 (October 2015)
▪ MySQL Cluster is 7.5.4
▪ There was a MySQL 6 in the
pre-Sun days
Engineering thought the new data
dictionary and other new features
justified the new major release
number.
5
You have a plethora of files out there -- .FRM .MYD .MYI .OPT and many more just waiting for something to go bad -- now store relevant information in data dictionary!
8
Good
Innodb is robust enough to
rebuild all information to
a point in time in case of
problems. So keep
EVERYTHING in internal data
structures. And that leads
to transactional ALTER TABLE commands.
Good news and maybe good news
Maybe good
The file system is no
longer the limiting factor.
So now you can have
millions of tables within a
schema.
The bad news there is that
you can have millions of
tables within a schema.
9
CTE example
WITH RECURSIVE my_cte AS( SELECT 1 AS n UNION ALL SELECT 1+n FROM my_cte WHERE n<10)SELECT * FROM my_cte; +------+| n |+------+| 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 |+------+10 rows in set (0,00 sec)
11
Windowing Functions
SELECT date, amount, sum(amount) OVER w AS ‘sum’ FROM paymentsWINDOW w AS (ORDER BY date RANGE BETWEEN INTERVAL 1 WEEK PRECEDING AND CURRENT ROW)ORDER BY date;
12
Slide decks from MySQL Developers:
http://www.slideshare.net/oysteing/
mysql-80-common-table-expressions-7
1760102
http://www.slideshare.net/DagHWanvi
k/sql-window-functions-for-mysql
13
Optimizer & Parser
Bye-bye \N -- a synonym for
NULL in SQL statements.
Descending indexes
Optimizer trace output now
includes more information
about filesort operations,
such as key and payload
size and why addon fields
are not packed.
The optimizer now supports
hints that enable
specifying the order in
which to join tables.
15
Roles
MySQL now supports roles, which are
named collections of privileges.
Roles can be created and dropped.
Roles can have privileges granted
to and revoked from them. Roles can
be granted to and revoked from user
accounts. The active applicable
roles for an account can be
selected from among those granted
to the account, and can be changed
during sessions for that account. 17
When UTF8 is not UTF8
MySQL 8 witll be UTF8MB4!
Previously UTF8 was actually UTF8MB3
> 3 byes, no emojis
> Supplementary multi-lingual plane support
limited
> No CJK Unified Ideographs Extension B are
in supplementary ideographic plane
> Upgrade problem expected!
19
Charset and Collation
utf8mb4_0900_ai_ci:
- 0900 refers to Unicode
Collation Algorithm
version.
- ai refers to accent
insensitive.
- ci refers to case
insensitive.
UTF8MB4
So yes you can have emojis!
20
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
22
SET PERSIST
mysql> SET PERSIST innodb_buffer_pool_size = 512 * 1024 * 1024;
Query OK, 0 rows affected (0.01 sec)
A MySQL server can be
configured and managed over
a SQL connection thus
removing manual file
operations (on
configuration files) to be
done by DBAs. This feature
addresses the usability
issues described above, and
allows MySQL to be more
easily deployed and
configured on cloud
platforms.
The file mysqld-auto.cnf
is created the first time
a SET PERSIST statement is
executed. Further SET
PERSIST statement
executions will append the
contents to this file.
This file is in JSON
format and can be parsed
using json parser.
24
Yes, we know that servers can be hard to manage and get
harder when they are in the cloud and out of reach of
‘percussive maintenance’ techniques.
Decoupling features like Group Replication and Document
Store from release cycle to make updates easier
25
Other new features not dependant on server GA
http://www.slideshare.net/NorvaldRyeng/mysql-80-
gis-are-you-ready
27
World can now be flat or ellipsoidal
Coordinate system wrap around
Boot.Geometry & Open GID
“GIS is a form of digital mapping
technology. Kind of like Google Earth but
better.”
-- Arnold Schwartzenegger
Governor of California
28
Test Todayhttps://dev.mysql.com/downloads/mysql/
USe MySQL 8 today, but
not in production -- it
is not GA yet
29
DMRsDeveloper Milestone Releases
have special features like CTEs
and are available at
https://labs.mysql.com30
Supported tags and respective Dockerfile links
8.0.0, 8.0, 8 (8.0/Dockerfile)
5.7.17, 5.7, 5, latest (5.7/Dockerfile)
5.6.35, 5.6 (5.6/Dockerfile)
5.5.54, 5.5 (5.5/Dockerfile)
Docker Images https://hub.docker.com/_/mysql/
31
Thanks!ANY QUESTIONS?
You can find me at:
@stoker
slideshare.net/davidmstokes
33
Top Related