The document discusses several new features in MySQL 8 including:
1. A new data dictionary that stores metadata internally instead of external files, allowing for transactional ALTER TABLE commands.
2. Support for common table expressions and windowing functions.
3. Improvements to the optimizer including index and join order hints, descending indexes, and optimizer trace output providing more details.
4. Support for roles which are named collections of privileges that can be assigned to users.
5. UTF8MB4 is now the default character set providing support for emoji and supplementary characters.
6. Ability to create invisible indexes that are not used by the optimizer but are maintained for testing performance impact.
PHP Detroit -- MySQL 8 A New Beginning (updated presentation)Dave Stokes
MySQL has many new features including a true data dictionary, better JSON support, histograms, roles, true descending indexes, 3d GIS, invisible indexes, and the default character set is UTF8MB4
Confoo 2021 - MySQL Indexes & HistogramsDave Stokes
Confoo 2021 presentation on MySQL Indexes, Histograms, and other ways to speed up your queries. This slide deck has slides that may not have been included in the presentation that were omitted due to time constraints
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...Dave Stokes
Slow query? Add an index or two! But things are suddenly even slower! Indexes are great tools to speed data lookup but have overhead issues. Histograms don’t have that overhead but may not be suited. And how you lock rows also effects performance. So what do you do to speed up queries smartly?
Changing your huge table's data types in productionJimmy Angelakos
You have a huge table, and it is necessary to change a column's data type, but your database has to keep running with no downtime. What do you do?
Here's one way to perform this change, in as unobtrusive a manner as possible while your table keeps serving users, by avoiding long DDL table locks and leveraging procedural transaction control.
Talk from the PostgreSQL devroom at FOSDEM 2021
Practical Partitioning in Production with PostgresJimmy Angelakos
Has your table become too large to handle? Have you thought about chopping it up into smaller pieces that are easier to query and maintain? What if it's in constant use?
An introduction to the problems that can arise and how PostgreSQL's partitioning features can help, followed by a real-world scenario of partitioning an existing huge table on a live system.
Talk from Postgres Vision 2021
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
MySQL 8 has many new features and this presentation covers the new data dictionary, improved JSON functions, roles, histograms, and much more. Updated after SunshinePHP 2018 after feedback
PHP Detroit -- MySQL 8 A New Beginning (updated presentation)Dave Stokes
MySQL has many new features including a true data dictionary, better JSON support, histograms, roles, true descending indexes, 3d GIS, invisible indexes, and the default character set is UTF8MB4
Confoo 2021 - MySQL Indexes & HistogramsDave Stokes
Confoo 2021 presentation on MySQL Indexes, Histograms, and other ways to speed up your queries. This slide deck has slides that may not have been included in the presentation that were omitted due to time constraints
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...Dave Stokes
Slow query? Add an index or two! But things are suddenly even slower! Indexes are great tools to speed data lookup but have overhead issues. Histograms don’t have that overhead but may not be suited. And how you lock rows also effects performance. So what do you do to speed up queries smartly?
Changing your huge table's data types in productionJimmy Angelakos
You have a huge table, and it is necessary to change a column's data type, but your database has to keep running with no downtime. What do you do?
Here's one way to perform this change, in as unobtrusive a manner as possible while your table keeps serving users, by avoiding long DDL table locks and leveraging procedural transaction control.
Talk from the PostgreSQL devroom at FOSDEM 2021
Practical Partitioning in Production with PostgresJimmy Angelakos
Has your table become too large to handle? Have you thought about chopping it up into smaller pieces that are easier to query and maintain? What if it's in constant use?
An introduction to the problems that can arise and how PostgreSQL's partitioning features can help, followed by a real-world scenario of partitioning an existing huge table on a live system.
Talk from Postgres Vision 2021
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
MySQL 8 has many new features and this presentation covers the new data dictionary, improved JSON functions, roles, histograms, and much more. Updated after SunshinePHP 2018 after feedback
MySQL 8.0 is a big advancement over previous versions with a true data dictionary, invisible indexes, histograms, windowing functions, improved JSON support, CATS, and more
Developers’ mDay 2019. -Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay konferencija okuplja inspirativne ljude iz oblasti web developmenta. U pitanju je događaj stručnog karaktera, namenjen web developerima sa ciljem da se upoznaju sa aktuelnim tehnologijama u projektovanju web sistema, iskustvima u korišćenju najnovijih tehnika i tehnologija, kao i u rešavanju problema sa kojima se svakodnevno suočavaju.
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...Cynthia Saracco
Got Big Data? Then check out what Big SQL can do for you . . . . Learn how IBM's industry-standard SQL interface enables you to leverage your existing SQL skills to query, analyze, and manipulate data managed in an Apache Hadoop environment on cloud or on premise. This quick technical tour is filled with practical examples designed to get you started working with Big SQL in no time. Specifically, you'll learn how to create Big SQL tables over Hadoop data in HDFS, Hive, or HBase; populate Big SQL tables with data from HDFS, a remote file system, or a remote RDBMS; execute simple and complex Big SQL queries; work with non-traditional data formats and more. These charts are for session ALB-3663 at the IBM World of Watson 2016 conference.
Confoo.ca conference talk February 24th 2021 on MySQL new features found in version 8.0 including server and supporting utility updates for those who may have missed some really neat new features
Need a preview of the exciting new features added to MySQL 8.0? Better Unicode support, better JSON and document handling. Find out what else did we improve in MySQL 8.0. Get the presentation on MySQL server 8.0.
Mario Molina, Software Engineer
CDC systems are usually used to identify changes in data sources, capture and replicate those changes to other systems. Companies are using CDC to sync data across systems, cloud migration or even applying stream processing, among others.
In this presentation we’ll see CDC patterns, how to use it in Apache Kafka, and do a live demo!
https://www.meetup.com/Mexico-Kafka/events/277309497/
Performance Tuning Oracle's BI ApplicationsKPI Partners
http://www.kpipartners.com/webinar-Performance-Tuning-Oracle-BI-Applications/ ... From a virtual event that discusses techniques that can be used to optimize performance of the Oracle BI Apps.
The BI Apps from Oracle present customers with a nice head start to getting their BI environment up and running. But for many customers, their user community demands lighting-fast speeds while running dashboards, reports and ad-hoc queries. Learn about some of the key techniques you can use to take the BI Apps to performance levels you didn’t think were possible.
The discussion begins with a conceptual understanding of why performance problems can exist and the counteracting design considerations. Special attention will be paid to the concept of a Performance Layer, describing what it is, what it is comprised of and how to build it. The presentation includes several real world examples of the significant performance gains that can be had from a Performance Layer.
Objective 1: Learn about the concept of a performance layer and what is involved with building one.
Objective 2: Understand the most important steps to improve the performance of your system.
Analyzing petabytes of smartmeter data using Cloud Bigtable, Cloud Dataflow, ...Edwin Poot
The Energy Industry is in transition due to the exponential growth of data being generated by the ever increasing number of connected devices which comprise the Smart Grid. Learn how Energyworx uses GCP to collect and ingest this IoT data with ease and is helping her customers uncover hidden value from this data, allowing them to create new business models and concepts.
Database basics for new-ish developers -- All Things Open October 18th 2021Dave Stokes
Do you wonder why it takes your database to find the top five of your fifty six million customers? Do you really have a good idea of what NULL is and how to use it? And why are some database queries so quick and others frustratingly slow? Relational databases have been around for over fifty years and frustrating developers for at least forty nine of those years. This session is an attempt to explain why sometimes the database seems very fast and other times not. You will learn how to set up data (normalization) to avoid redundancies into tables by their function, how to join two tables to combine data, and why Structured Query Language is so very different than most other languages. And you will see how thinking in sets over records can greatly improve your life with a database.
More Related Content
Similar to MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019
MySQL 8.0 is a big advancement over previous versions with a true data dictionary, invisible indexes, histograms, windowing functions, improved JSON support, CATS, and more
Developers’ mDay 2019. -Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay konferencija okuplja inspirativne ljude iz oblasti web developmenta. U pitanju je događaj stručnog karaktera, namenjen web developerima sa ciljem da se upoznaju sa aktuelnim tehnologijama u projektovanju web sistema, iskustvima u korišćenju najnovijih tehnika i tehnologija, kao i u rešavanju problema sa kojima se svakodnevno suočavaju.
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...Cynthia Saracco
Got Big Data? Then check out what Big SQL can do for you . . . . Learn how IBM's industry-standard SQL interface enables you to leverage your existing SQL skills to query, analyze, and manipulate data managed in an Apache Hadoop environment on cloud or on premise. This quick technical tour is filled with practical examples designed to get you started working with Big SQL in no time. Specifically, you'll learn how to create Big SQL tables over Hadoop data in HDFS, Hive, or HBase; populate Big SQL tables with data from HDFS, a remote file system, or a remote RDBMS; execute simple and complex Big SQL queries; work with non-traditional data formats and more. These charts are for session ALB-3663 at the IBM World of Watson 2016 conference.
Confoo.ca conference talk February 24th 2021 on MySQL new features found in version 8.0 including server and supporting utility updates for those who may have missed some really neat new features
Need a preview of the exciting new features added to MySQL 8.0? Better Unicode support, better JSON and document handling. Find out what else did we improve in MySQL 8.0. Get the presentation on MySQL server 8.0.
Mario Molina, Software Engineer
CDC systems are usually used to identify changes in data sources, capture and replicate those changes to other systems. Companies are using CDC to sync data across systems, cloud migration or even applying stream processing, among others.
In this presentation we’ll see CDC patterns, how to use it in Apache Kafka, and do a live demo!
https://www.meetup.com/Mexico-Kafka/events/277309497/
Performance Tuning Oracle's BI ApplicationsKPI Partners
http://www.kpipartners.com/webinar-Performance-Tuning-Oracle-BI-Applications/ ... From a virtual event that discusses techniques that can be used to optimize performance of the Oracle BI Apps.
The BI Apps from Oracle present customers with a nice head start to getting their BI environment up and running. But for many customers, their user community demands lighting-fast speeds while running dashboards, reports and ad-hoc queries. Learn about some of the key techniques you can use to take the BI Apps to performance levels you didn’t think were possible.
The discussion begins with a conceptual understanding of why performance problems can exist and the counteracting design considerations. Special attention will be paid to the concept of a Performance Layer, describing what it is, what it is comprised of and how to build it. The presentation includes several real world examples of the significant performance gains that can be had from a Performance Layer.
Objective 1: Learn about the concept of a performance layer and what is involved with building one.
Objective 2: Understand the most important steps to improve the performance of your system.
Analyzing petabytes of smartmeter data using Cloud Bigtable, Cloud Dataflow, ...Edwin Poot
The Energy Industry is in transition due to the exponential growth of data being generated by the ever increasing number of connected devices which comprise the Smart Grid. Learn how Energyworx uses GCP to collect and ingest this IoT data with ease and is helping her customers uncover hidden value from this data, allowing them to create new business models and concepts.
Similar to MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019 (20)
Database basics for new-ish developers -- All Things Open October 18th 2021Dave Stokes
Do you wonder why it takes your database to find the top five of your fifty six million customers? Do you really have a good idea of what NULL is and how to use it? And why are some database queries so quick and others frustratingly slow? Relational databases have been around for over fifty years and frustrating developers for at least forty nine of those years. This session is an attempt to explain why sometimes the database seems very fast and other times not. You will learn how to set up data (normalization) to avoid redundancies into tables by their function, how to join two tables to combine data, and why Structured Query Language is so very different than most other languages. And you will see how thinking in sets over records can greatly improve your life with a database.
Longhorn PHP - MySQL Indexes, Histograms, Locking Options, and Other Ways to ...Dave Stokes
Slow query? Add an index or two! But things are suddenly even slower! Indexes are great tools to speed data lookup but have overhead issues. Histograms don’t have that overhead but may not be suited. And how you lock rows also effects performance. So what do you do to speed up queries smartly? This is a clear, detailed look at what you can do to really speed up your queries in a logical, orthogonal process. Updated Presentation for Longhorn PHP Conference October 14th, 2021
MySQL 8.0 New Features -- September 27th presentation for Open Source SummitDave Stokes
MySQL 8.0 has many new features that you probably need to know about but don't. Like default security, window functions, CTEs, CATS (not what you think), JSON_TABLE(), and UTF8MB4 support.
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptDave Stokes
The MySQL Shell has a JavaScript mode where you can use JS libraries to access you data and you can also write (and save) your own custom reports (or programs) for future use.
Dutch PHP Conference 2021 - MySQL Indexes and HistogramsDave Stokes
Slides from the 2021 Dutch PHP Conference on MySQL Indexes, histograms, and other things to speed up your database queries. Speeding up your database queries is mainly learning how to efficiently give the query optimizer what is needs to provide the best query plan for your data.
Validating JSON -- Percona Live 2021 presentationDave Stokes
JSON is a free form data exchange format which can cause problems when combined with a strictly typed relational database. Thanks to the folks at https://json-schema.org and the MySQL engineers at Oracle we can no specify required fields, type checks, and range checks.
Data Love Conference - Window Functions for Database AnalyticsDave Stokes
16 April 2021 presentation for the Data Love Conference on Window Functions for Data Base Analytics. Examples are on MySQL but will work for other RDMS's with window functions. Assumes no user background on window functions or analytics
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...Dave Stokes
Speeding up queries on a MySQL server with indexes and histograms is not a mysterious art but simple engineering. This presentation is an indepth introduction that was presented on March 30th to the Quest Insynch and Open Source 101 conferences
A Step by Step Introduction to the MySQL Document StoreDave Stokes
Looking for a fast, flexible NoSQL document store? And one that runs with the power and reliability of MySQL. This is an intro on how to use the MySQL Document Store
MySQL New Features -- Sunshine PHP 2020 PresentationDave Stokes
MySQL has moved to a quarterly release cycle and it can be hard to keep up with the new features. For instance, there are now multi-valued indexes for things like JSON arrays to allow for fast searches of embedded data. And there is a bulk loaded for JSON, CSV, and TSV data that works in parallel. Or support for JSON-Schame.org's JSON schema validation. Plus you no longer need to run mysql_upgrade after an upgrade as that is all automated. In addition, you can now clone InnoDB tablespaces for fast initialization of replicate data. So if you need to catch up on the latest and greatest from MySQL you need to be in this session.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Epistemic Interaction - tuning interfaces to provide information for AI support
MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019
1. Features
For DevelopersDave Stokes
MySQL Community Manager
David.Stokes@Oracle.com @Stoker
Slides -> https://slideshare.net/davidmstokes
Blog -> https://elephantdolphin.blogspot.com
2. 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
4. MySQL News
● 24 years old! Oracle owned for nine years!
● MySQL 8.0 is the current Generally Available release
● Document Store
● Group Replication
● We’re Hiring
4
7. Well..
● Previous GA is 5.7 (October 2015)
● MySQL Cluster is 7.6.11 (8.0.17 release candidate available)
● There was a MySQL 6 in the pre-Sun days, kinda like the PHP version six
that nobody really talks about except in hushed tones and with great
sadness
Engineering thought the new data dictionary and other new features
justified the new major release number.
7
8. 1.Data Dictionary
Before MySQL 8 -- Meta Data Stored in files!
You have had 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!
This means you are no longer dependent in the
number of inodes on your system, somebody
rm-ing the files at just the wrong time, and a
whole host of other problems.
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.
8
9. System Tables are now InnoDB
Previously, these were MyISAM (non transactional) tables. This change applies
to these tables: user, db, tables_priv, columns_priv, procs_priv, proxies_priv.
9
10. Good News!?
So now you can have
millions of tables
within a schema.
The bad news is
that you can have
millions of tables
within a schema.
10
11. 2.CTEs & Windowing Functions
Long requested, Common Table Expression and Windowing Functions have a
wide variety of uses.
● CTEs are handy subquery-like statements often used in quick
calculations
● Windowing Functions are great for iterating over a selected set of rows
for things like statistical calculations
11
12. Windowing
Function
The key word is
OVER
SELECT name,
department_id,
salary,
SUM(salary)
OVER
(PARTITION BY
department_id) AS
department_total
FROM employee
ORDER BY department_id, name 12
13. Another
Example
Windowing
functions are great
when dealing with
dates
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;
13
14. CTEs
..are like derived
tables but the
declaration is
BEFORE the query
WITH qn AS (SELECT
t1 FROM mytable)
SELECT * FROM qn.
14
15. JOINing two CTEs 15
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;
16. Common
Table
Expression -
recursive
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+------+
10 rows in set (0,00 sec)
WITH RECURSIVE my_cte AS
(
SELECT 1 AS n
UNION ALL
SELECT 1+n FROM my_cte
WHERE n<10
)
SELECT * FROM my_cte;
16
18. 3. Optimizer & Parser
● 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.
● 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.
● Index and Join Order Hints -- User controls order
● NOWAIT and SKIPPED LOCKED to bypass locked records
18
20. How SKIP LOCKED or NOWAIT look
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;
20
21. Contention-Aware Transaction Scheduling
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.
21
22. Multi Valued Index
Getting past the 1:1 Index Ratio
22
SELECT _id, data->>"$.nbr"
FROM a1
WHERE 99999 MEMBER OF (data->"$.nbr");
Very useful in cases where you
multiple phone numbers, postal codes,
part numbers within an JSON array!
23. 4. 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.
Set up and account for a certain function and then assign
users who need that function.
23
25. Not all UTf8 equal
utf8mb4_0900_ai_ci:
0900 refers to Unicode
Collation Algorithm version.
- ai refers to accent
insensitive.
- ci refers to case
insensitive.
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!
Also supports GB18030 character set!
25
27. 6. 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
27
31. Why SET PERSIST (pronounced Docker)
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.
Timestamp & User recorded
31
32. Other new
features not
dependant on
server GA
Decoupling features like Group
Replication and Document Store
from release cycle to make
updates easier
● Add new features via a plug-in
● Make upgrades less onerous
● Easier management of featuresYes, 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.
32
33. 8. 3G Geometry
“GIS is a form of digital mapping technology.
Kind of like Google Earth but better.”
-- Arnold Schwarzenegger
Governor of California
33
34. 8. 3D Geometry
● World can now be flat or ellipsoidal
● Coordinate system wrap around
● Boot.Geometry & Open GID
● Code related to geometry parsing, computing bounding boxes
and operations on them, from the InnoDB layer to the
Server layer so that geographic R-trees can be supported
easily in the future without having to change anything in
InnoDB
34
35. 9. JSON -- A big change in Databases
We can use a JSON field to eliminate one of the issues of traditional database
solutions: many-to-many-joins
This allows more freedom to store unstructured data (data with pieces missing)
You still use SQL to work with the data via a database connector but the JSON
documents in the table can be manipulated directly in code.
Joins can be expensive. Reducing how many places you need to join data can help
speed up your queries. Removing joins may result in some level of denormalization
but can result in fast access to the data. 35
36. Plan for Mutability
Schemaless designs are focused on mutability. Build your
applications with the ability to modify the document as
needed (and within reason)
36
37. Remove Many-to-Many Relationships
● Use embedded arrays and lists to store relationships among documents.
This can be as simple as embedding the data in the document or
embedding an array of document ids in the document.
● In the first case data is available as soon as you can read the document
and in the second it only takes one additional step to retrieve the data. In
cases of seldom read (used) relationships, having the data linked with an
array of ids can be more efficient (less data to read on the first pass)
37
38. ->> Operator
MySQL 8 adds a new unquoting extraction operator ->>, sometimes also referred to as
an inline path operator, for use with JSON documents stored in MySQL. The new
operator is similar to the -> operator, but performs JSON unquoting of the value as
well.
The following three expressions are equivalent:
● JSON_UNQUOTE( JSON_EXTRACT(mycol, "$.mypath") )
● JSON_UNQUOTE(mycol->"$.mypath")
● mycol->>"$.mypath"
Can be used with (but is not limited to) SELECT lists, WHERE and HAVING clauses,
and ORDER BY and GROUP BY clauses. 38
40. JSON_ARRAYAGG
mysql> SELECT col FROM t1;
+--------------------------------------+
| col |
+--------------------------------------+
| {"key1": "value1", "key2": "value2"} |
| {"keyA": "valueA", "keyB": "valueB"} |
+--------------------------------------+
2 rows in set (0.00 sec)
mysql> SELECT JSON_ARRAYAGG(col) FROM t1;
+------------------------------------------------------------------------------+
| JSON_ARRAYAGG(col) |
+------------------------------------------------------------------------------+
| [{"key1": "value1", "key2": "value2"}, {"keyA": "valueA", "keyB": "valueB"}] |
+------------------------------------------------------------------------------+ 40
41. JSON_OBJECTAGG()
mysql> SELECT id, col FROM t1;
+------+--------------------------------------+
| id | col |
+------+--------------------------------------+
| 1 | {"key1": "value1", "key2": "value2"} |
| 2 | {"keyA": "valueA", "keyB": "valueB"} |
+------+--------------------------------------+
2 rows in set (0.00 sec)
mysql> SELECT JSON_OBJECTAGG(id, col) FROM t1;
+----------------------------------------------------------------------------------------+
| JSON_OBJECTAGG(id, col) |
+----------------------------------------------------------------------------------------+
| {"1": {"key1": "value1", "key2": "value2"}, "2": {"keyA": "valueA", "keyB": "valueB"}} |
+----------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
41
Both JSON_ARRAY_AGG and
JSON_OBJECTAGG() work with
both JSON and non JSON
COLUMNS!
42. JSON_TABLE - Structure your unstructured data
mysql> select country_name, IndyYear
from countryinfo,
json_table(doc,"$" columns (
country_name char(20) path "$.Name",
IndyYear int path "$.IndepYear")
) as stuff
where IndyYear > 1992;
+----------------+----------+
| country_name | IndyYear |
+----------------+----------+
| Czech Republic | 1993 |
| Eritrea | 1993 |
| Palau | 1994 |
| Slovakia | 1993 |
+----------------+----------+ 43
JSON_TABLE is used for
making JSON data a temporary
relational data, which is
especially useful when creating
relational views over JSON data,
43. JSON Table -- a Deeper Look 44
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 |
46. MySQL Document Store
Relational databases such as MySQL usually required a document schema to
be defined before documents can be stored.
A new plug-in enables you to use MySQL as a document store, which is a
schema-less, and therefore schema-flexible, storage system for documents.
When using MySQL as a document store, to create documents describing
products you do not need to know and define all possible attributes of any
products before storing them and operating with them.
47
47. MySQL Document Store
This differs from working with a relational database and storing products in a
table, when all columns of the table must be known and defined before adding
any products to the database.
This allows you to choose how you configure MySQL, using only the document
store model, or combining the flexibility of the document store model with the
power of the relational model.
48
48. Using the MySQL Document Store with the X DevAPI PECL Extension 49
#!/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();
var_dump($data);
?>
49. Python in the new MySQL Shell 50
mysql-py> db.countryinfo.find("GNP > 5000000").fields(["GNP",
"Name"])
[
{
"GNP": 8510700,
"Name": "United States"
}
]
1 document in set (0.00 sec)
50. 10. Resource Groups
Groups can be established so that threads execute according to the resources available to the group. Group attributes enable control
over its resources, to enable MySQL supports creation and management of resource groups, and permits assigning threads running
within the server to particular group or restrict resource consumption by threads in the group. DBAs can modify these attributes as
appropriate for different workloads.
For example, to manage execution of batch jobs that need not execute with high priority, a DBA can create a Batch resource group,
and adjust its priority up or down depending on how busy the server is. (Perhaps batch jobs assigned to the group should run at lower
priority during the day and at higher priority during the night.) The DBA can also adjust the set of CPUs available to the group.
CREATE RESOURCE GROUP Batch
TYPE = USER
VCPU = 2-3 -- assumes a system with at least 4 CPUs
THREAD_PRIORITY = 10;
INSERT /*+ RESOURCE_GROUP(Batch) */ INTO t2 VALUES(2);
51
51. 11. Histograms - Indexing without indexes!
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.
52
52. Histograms
mysql> ANALYZE TABLE customer UPDATE HISTOGRAM ON c_mktsegment WITH 1024 BUCKETS;
+---------------+-----------+----------+---------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+---------------+-----------+----------+---------------------------------------------------------+
| dbt3.customer | histogram | status | Histogram statistics created for column 'c_mktsegment'. |
+---------------+-----------+----------+---------------------------------------------------------+
53
53. Two reasons for why you might consider a
histogram instead of an index
Maintaining an index has a cost. If you have an index, every
INSERT/UPDATE/DELETE causes the index to be updated.
This is not free, and will have an impact on your
performance.
A histogram on the other hand is created once and never
updated unless you explicitly ask for it.
It will thus not hurt your INSERT/UPDATE/DELETE-
performance.
54
If you have an index, the optimizer will do what we call
“index dives” to estimate the number of records in a given
range.
This also has a certain cost, and it might become too costly
if you have for instance very long IN-lists in your query.
Histogram statistics are much cheaper in this case, and
might thus be more suitable.
54. 12. Bye Bye MEMORY Storage Engine
The TempTable storage engine replaces the MEMORY storage engine as the
default engine for in-memory internal temporary tables. The TempTable
storage engine provides efficient storage for VARCHAR and VARBINARY
columns.
Performance is ten times better than 5.7!!
55
55. https://stackoverflow.com/questions/5050
5236/mysql-8-0-group-by-performance
5down vote
MySQL 8.0 uses a new storage engine, TempTable, for internal temporary tables. (See MySQL Manual for details.) This
engine does not have a max memory limit per table, but a common memory pool for all internal tables. It also has its own
overflow to disk mechanism, and does not overflow to InnoDB or MyISAM as earlier versions.
The profile for 5.7 contains "converting HEAP to ondisk". This means that the table reached the max table size for the
MEMORY engine (default 16 MB) and the data is transferred to InnoDB. Most of the time after that is spent accessing the
temporary table in InnoDB. In MySQL 8.0, the default size of the memory pool for temporary tables is 1 GB, so there will
probably not be any overflow to disk in that case.
56
56. 13. X DevAPI on by default on port 33060
MySQL Document Store allows developers to work
with SQL relational tables and schema-less JSON
collections.
To make that possible MySQL has created the X Dev
API which puts a strong focus on CRUD by providing a
fluent API allowing you to work with JSON documents
in a natural way.
The X Protocol is a highly extensible and is optimized
for CRUD as well as SQL API operations.
57
57. SQL + NoSQL
Schema-less NoSQL
JSON Document Store
with ACID compliance.
And you can also access
relational data!
58
1GB documents
versus
Mongo’s 16MB!
58. Using MySQL without SQL!
$nodeSession =
mysql_xdevapigetNodeSession($connection_uri);
$schema = $nodeSession->getSchema("world_x");
$collection = $schema->getCollection("countryinfo");
$result = $collection->find('_id = "USA"')-
>execute();
$data = $result->fetchAll();
var_dump($data);
59
59. The 10 Best Restaurants of Different Cuisines
WITH cte1 AS (SELECT doc->>"$.name" AS name,
doc->>"$.cuisine" AS cuisine,
(SELECT AVG(score) FROM JSON_TABLE(doc, "$.grades[*]"
COLUMNS (score INT PATH "$.score")) AS r) AS
avg_score
FROM restaurants)
SELECT *, RANK()
OVER (PARTITION BY cuisine ORDER BY avg_score DESC) AS `rank`
FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;
+-----------------------+--------------------------------+-----------+------+
| name | cuisine | avg_score | rank |
+-----------------------+--------------------------------+-----------+------+
| Juice It Health Bar | Juice, Smoothies, Fruit Salads | 75.0000 | 1 |
| Golden Dragon Cuisine | Chinese | 73.0000 | 1 |
| Palombo Pastry Shop | Bakery | 69.0000 | 1 |
| Go Go Curry | Japanese | 65.0000 | 1 |
| K & D Internet Inc | Café/Coffee/Tea | 61.0000 | 1 |
| Koyla | Middle Eastern | 61.0000 | 1 |
| Ivory D O S Inc | Other | 60.0000 | 1 |
| Espace | American | 56.0000 | 1 |
| Rose Pizza | Pizza | 52.0000 | 1 |
| Tacos Al Suadero | Mexican | 52.0000 | 1 |
+-----------------------+--------------------------------+-----------+------+
60
This query uses
JSON_TABLE to
structure the schema-less
data within a CTE and
then the CTE is queried
to get the top 10
restaurants with a
Windowing Function
60. The 10 Best Restaurants of Different Cuisines
The JSON_TABLE, CTE, and Windowing Function 61
This query uses
JSON_TABLE to
structure the
schema-less data
within a CTE and
then the CTE is
queried to get the top
10 restaurants with a
Windowing
Function
WITH cte1 AS (SELECT doc->>"$.name" AS name,
doc->>"$.cuisine" AS cuisine,
(SELECT AVG(score) FROM
JSON_TABLE(doc, "$.grades[*]"
COLUMNS (score INT PATH "$.score")) AS r)
AS avg_score FROM restaurants)
SELECT *, RANK()
OVER (PARTITION BY cuisine
ORDER BY avg_score DESC) AS `rank`
FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;
62. 8.0.16 - April 63
1.The mysql_upgrade script runs automatically
2.Constraint checks
3.MySQL C API supports asynchronous, non blocking communications with server
4.EXPLAIN FORMAT=TREE
63. 8.0.14/15 - January/February 64
1.Dual Passwords
2.Admin TCP/IP port (default 33062),
no limit on number of connections,
requires SERVICE_CONNETION_ADMIN priviledge
3.JSON_ARRAYAGG() and JSON_OBJECTAGG() added to Window Functions
4.SET PERSIST and SET PERSIST ONLY
5.LATERAL derived tables
64. 8.0.18 - October 65
1.Multi-valued indexes
2.JSON Document Validation
3.Dual Password
4.Clone Table Space for Replication
5.New utf8mb4_900_bin (faster storts), no pad attribute
65. 8.0.17 - July 66
1.Random Passwords – CREATE USER, ALTER
USER, and SET PASSWORD
2.EXPLAIN ANALYSE
3.HASH JOINS
4.Compression –
added ztsd (uncompresses or zlib other options)
5.Enterprise Edition supports HashCorp Vault
69. MySQL
Group
Replication
MySQL 5.7 or later
70
MySQL Group Replication is a MySQL Server plugin that enables you to create
elastic, highly-available, fault-tolerant replication topologies.
There is a built-in group membership service that keeps the view of the group
consistent and available for all servers at any given point in time. Servers can
leave and join the group and the view is updated accordingly. Sometimes servers
can leave the group unexpectedly, in which case the failure detection mechanism
detects this and notifies the group that the view has changed. This is all automatic.
72. New MySQL Shell
73
The new MySQL Shell has three modes - JavaScript, Python, & SQL
plus admin tools -- check for upgrades, JSON bulk loader, InnoDB Cluster
admin
73. Buy My Book (please!)
74
What you need
to know to use
the MySQL
JSON data type
with lots of
examples!
75. 76
WITH cte1 AS (SELECT doc->>"$.name" AS name,
doc->>"$.cuisine" AS cuisine,
(SELECT AVG(score) FROM JSON_TABLE(doc, "$.grades[*]"
COLUMNS (score INT PATH "$.score")) AS r) AS avg_score
FROM restaurants)
SELECT *, RANK()
OVER (PARTITION BY cuisine ORDER BY avg_score DESC) AS `rank`
FROM cte1 ORDER BY `rank`, avg_score DESC LIMIT 10;
+-----------------------+--------------------------------+-----------+------+
| name | cuisine | avg_score | rank |
+-----------------------+--------------------------------+-----------+------+
| Juice It Health Bar | Juice, Smoothies, Fruit Salads | 75.0000 | 1 |
| Golden Dragon Cuisine | Chinese | 73.0000 | 1 |
| Palombo Pastry Shop | Bakery | 69.0000 | 1 |
| Go Go Curry | Japanese | 65.0000 | 1 |
| K & D Internet Inc | Café/Coffee/Tea | 61.0000 | 1 |
| Koyla | Middle Eastern | 61.0000 | 1 |
| Ivory D O S Inc | Other | 60.0000 | 1 |
| Espace | American | 56.0000 | 1 |
| Rose Pizza | Pizza | 52.0000 | 1 |
| Tacos Al Suadero | Mexican | 52.0000 | 1 |
+-----------------------+--------------------------------+-----------+------+
That query by itself