MySQL HeatWave Implementation Associate

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

MySQL HeatWave Implementation Associate

Exam 1Z0-915-1

Alexandre Fagundes
[email protected]
Cloud Architect, Oracle Latin America
Copyright © 2024, Oracle and/or its affiliates
Exam 1Z0-915-1: MySQL HeatWave Implementation Associate

•Create and Manage MySQL Database Service Instances


•Migrate an On-Premise Database to the Cloud
•Monitor Instances and Adjust Use of Resources
•Configure MySQL DB Systems
•Manage MySQL DB Systems
•Back Up MySQL DB Systems
•Migrate Your Data to MySQL Database Service
•MySQL Database Service High Availability
•Implement MySQL HeatWave for Query Acceleration

https://education.oracle.com/mysql-heatwave-implementation-associate-rel1/pexam_1Z0-915-1

Copyright © 2024, Oracle and/or its affiliates


MySQL Heatwave Overview

Copyright © 2024, Oracle and/or its affiliates


MySQL is optimized for OLTP, not designed for analytic processing

OLTP DB

Separate analytics database


OLTP Applications
Complex ETL

ETL Service No real-time analytics

Security & compliance risks


OLAP DB

Increased costs
OLAP Applications

Copyright © 2024, Oracle and/or its affiliates


MySQL HeatWave overview
Transactions, real-time analytics across data warehouse and data lake, and machine learning in one database service

Social, eCommerce, gaming, healthcare, fintech, IoT apps. Analytics and ML tools.

Queries Results

MySQL HeatWave Object Store

Database
Analytics Autopilot exports
OLTP In-database ML

Data remains in object store,


processing is done in HeatWave
For both non-MySQL and MySQL workloads
Copyright © 2024, Oracle and/or its affiliates
MySQL HeatWave: fully managed database service
100% developed, managed, and supported by Oracle
Automation MySQL HeatWave

High Availability

Read Replicas

Backup

Query Acceleration

Database MySQL AutoPilot

HeatWave AutoML

HeatWave Lakehouse

Security Patch & Upgrade

Provision & Configure

OS Security Patch & Upgrade


OS
OS Installation

Server Hardware Provisioning & Maintenance

Storage Storage Provisioning & Maintenance

Rack & Space


Data Center
Power, HVAC, Networking
Copyright © 2024, Oracle and/or its affiliates
One database is better than two

One service for OTLP & OLAP

No ETL duplication
Transactional
applications
Unmatched performance, at a
fraction of the cost
Analytics tools and InnoDB HeatWave
applications storage analytics Real-time analytics
engine cluster

Improved security

Applications work without changes

1>2 with MySQL HeatWave

Copyright © 2024, Oracle and/or its affiliates


In-Memory hybrid columnar processing

Copyright © 2024, Oracle and/or its affiliates


Massive amount of data stored in files

• Databases are systems of record


• Files are repository for other types of data (e.g IoT, web content, log files)
• Over 80% of the data we generate is in files
• 99.5% of collected data remains unused
• Lack of time, resources, and expertise to process different data formats across different data sources

Social Voice
Devices

Object Store

Events
Sensors

Copyright © 2024, Oracle and/or its affiliates


MySQL HeatWave Lakehouse
Query half a PB data in the object store—in a variety of file formats

• Query data in MySQL, in the object


store, or across both—using standard
SQL syntax

• Up to 500 TB of data—the HeatWave


cluster scales to 512 nodes

• Querying the data in the object store


is as fast as querying the database –
an industry first!

• Scale out data processing in the


object store, data is not copied to the
MySQL Database: for both MySQL
and non-MySQL workloads

Copyright © 2024, Oracle and/or its affiliates


Very simple to query files in the object store
STANDARD SQL syntax generated by MySQL Autopilot, no human required

1. System Setup
 Run MySQL Autopilot on object store to determine cluster size and schema mapping
 Execute DDLs generated by Autopilot

2. Run query across files and tables


 mysql> SELECT count(*) FROM Sensor, SALES WHERE Sensor.degrees > 30 AND Sensor.date =
SALES.date;

Copyright © 2024, Oracle and/or its affiliates


HeatWave scales out
Flexible, fast and highly scalable

Scale to any cluster size Fast provisioning High Scale Factor

• Flexible cluster size up to • Provision cluster in less than • Load performance scales with
512 HeatWave nodes 16 mins for up to 512 nodes cluster size
• Scale to any size based on • Pause & resume cluster to • Query performance scales
workload and performance minimize cost with cluster size
requirements

Copyright © 2024, Oracle and/or its affiliates


Backups
Manual or Automatic

• Retention Period
• When to Backup
• Full or Incremental
• Point-in-Time Recovery (only non-HA DB Systems)

Copyright © 2024, Oracle and/or its affiliates


High Availability

Copyright © 2024, Oracle and/or its affiliates


High Availability
Single-click HA

Copyright © 2024, Oracle and/or its affiliates


High Availability
Single-click HA

• SLA 99.99%
• Automatic failover
• Zero Data Loss during failure event
• Option to manually switch-over
• Rolling upgrades during maintenance

Copyright © 2024, Oracle and/or its affiliates


MySQL Heatwave for OLTP

Copyright © 2024, Oracle and/or its affiliates


Read Replicas
Scale Read Workloads

• Increase capacity for read-intensive workloads


• Add and remove Read Replicas for horizontal elasticity
• Easy to deploy and maintain
• Built-in Load Balancer for the read-only endpoint
• HA Cluster is ready for switchover or failover

Copyright © 2024, Oracle and/or its affiliates


Read Scalability

Copyright © 2024, Oracle and/or its affiliates


Read Replicas
Single-click Read Replicas

• A single click creates a Read Replica


• Provision
• Launch
• Setup Replication
• Monitor and Manage

• Read Replicas are associated with a DB System


• RO endpoints in the DB System
• Up to 18 max per DB System
• Requires a shape of 4 OCPUs or larger
• CLI, SDK and Terraform support

Copyright © 2024, Oracle and/or its affiliates


Load Balancer
Use Your Replicas Efficiently

When using Read Replicas a Load Balancer Endpoint is automatically provisioned in your DB System.
• Managed by the service
• Materializes as a Read-Only endpoint
• Round robins traffic across Read Replicas
• Manages Read Replica backends automatically

Copyright © 2024, Oracle and/or its affiliates


In-Database ML and generative AI with all their
data

Copyright © 2024, Oracle and/or its affiliates


The pain of using AWS services

Amazon Redshift with RDS and ML Modeling

Amazon RDS

RDS to Redshift Pipeline


Utilizing Lambda, Glue, & S3

Redshift ML does NOT provide in-database ML; exports data to SageMaker via Amazon S3

Copyright © 2024, Oracle and/or its affiliates


Machine learning in action with MySQL HeatWave

OLTP Analytics
Applications Tools

Social
Real-time
Real-time ML
analytics on
recommendations
trends
ECommerce

FinTech

SaaS

Copyright © 2024, Oracle and/or its affiliates


HeatWave AutoML automates the ML lifecycle | All models can be explained

Dataset

Data preprocessing
Regulatory compliance
Algorithm selection

Adaptive sampling Fairness


Feature selection Repeatability
Hyper-parameter tuning
Causality
Model explainer
Trust
Prediction explainer

Tuned model

Copyright © 2024, Oracle and/or its affiliates


Auto Pilot

Copyright © 2024, Oracle and/or its affiliates


Manual management tasks consume resources

• On-premises:
• Database management: provisioning, configuration, backup, HA, patching, security & more
• Operating system management: installation, patching, upgrades...
• Infrastructure management: purchase and maintenance of servers, storage
• Data center management: space, power, cooling, disaster recovery & more

• In the cloud with a managed database service:


• Provisioning: right-sizing a database
• Data loading: optimizing load time, memory usage, encoding, data placement
• Query execution: performance tuning, prioritization of queries
• Failure handling: actions to handle an error recovery

Copyright © 2024, Oracle and/or its affiliates


Machine learning-powered automation for MySQL HeatWave
High query performance at scale, higher OLTP throughput, and the best price performance

Copyright © 2024, Oracle and/or its affiliates


MySQL Autopilot Architecture

Copyright © 2024, Oracle and/or its affiliates


Auto Provisioning
Machine learning prediction of memory usage to estimate cluster size
Traditional Provisioning Flow Auto Provisioning

Provision right
Analyze DB schemas/tables cluster size
MySQL
Guess a cluster size

Iterate
HeatWave
Nodes

Adaptive Sampling
Datasets Accuracy in memory prediction 0.01%

Error %
0.1%
TPCH 1024G 98.4%
TPCDS 1024G 96.9%
Cust A 98.3%
Sample Size
Cust B 96.9%
< 0.1% of data scanned for prediction
31 Copyright © 2024, Oracle and/or its affiliates
Auto provisioning with MySQL HeatWave Lakehouse
How to determine the right cluster size required for processing data in object store?

Copyright © 2024, Oracle and/or its affiliates


Auto Query Plan Improvement
Optimizer learns and improves query plan based on queries executed earlier

Node Statistics

⨝ A 70 ∪
B 150
A⨝B 1000
C …
⨝ C ⨝ D
A⨝B⨝ C …

Runtime statistics
A B A B

• Traditional caching techniques are not intelligent


• With Autopilot, system gets better as more queries are run
• For example, Autopilot improves TPCH, TPCDS 24TB performance by 40%

Copyright © 2024, Oracle and/or its affiliates


33
MySQL Autopilot helps with HeatWave Lakehouse query performance
Statistics are computed while loading files into HeatWave storage

1. Local statistics are computed on the fly

2. Statistics aggregated during load 3. Statistics available for queries

P1 P2 P1 P2
∑ ∑
P3 P4 Aggregated stats P3 P4 Aggregated stats

2. Fetch
local stats
3. Write
1. Aggregate aggregated
C1 C2 C1 C2 C1 C2
statistics – N1 C1 C2 statistics
N1 N1 N1
N1
C3 …… CN C3 … CN C3 … CN
C3 CN
Copyright © 2024, Oracle and/or its affiliates
Auto Scheduling
Reduces wait time for mixed (OLTP + OLAP) workloads
BASELINE

• Analytic queries usually take longer than OLTP queries Time


Session 1 Q1
• HeatWave predicts execution time of each query Session 2 wait Q2
Session 3 wait Q3
• Short queries are prioritized over long running queries
• System reduces wait time for shorter queries without
changing total execution time
AUTO
SCHEDULING
Time
Session 1 Q1
Session 2 wait Q2
Session 3 wait Q3

Short queries in workload Long queries in workload


Auto-Scheduling Auto-Scheduling
Query Baseline (sec) Query Baseline (sec)
(sec) (sec)
12 26.03 7.43 21 62.17 65.59
16 27.18 12.45 18 44.37 59.41
10 18.93 12.62 Elapse Time 9 31.42 25.59 Elapse Time
7 16.27 12.08 Improvement 17 38.06 42.07 Increase
19 18.24 13.81 1 22.02 23.56
Geomean 20.89 11.43 45.29% Geomean 37.34 39.72 6.36%

Copyright © 2024, Oracle and/or its affiliates


Auto compression
Optimal column compression based on workload characteristics without manual intervention

• Introduced multiple compression algorithms


• HeatWave selects optimal compression for each column based on data and query characteristics
• Improves memory consumption and query performance

ORIGINAL NEW % MEMORY PERFORMANCE


4TB
MEMORY MEMORY SAVINGS IMPACT

TPCDS 324GB 243GB 25% 6% better

TPCH 308GB 291GB 6% 10% better

Reduces memory usage to save costs

Copyright © 2024, Oracle and/or its affiliates


Auto load and unload

• Automatically loads tables or columns into HeatWave to optimize performance of user workload
• Automatically unloads tables less frequently used than other tables to optimize performance without
increasing cost
MySQL HeatWave
Database Cluster

LOAD

Workloads Frees developers


UNLOAD from manually
loading/unloading tables

Copyright © 2024, Oracle and/or its affiliates


Auto Unload
The system recommends which tables can be unloaded based on workload history

Recommends which Provides explanation for


tables can be unloaded the recommendation

Copyright © 2024, Oracle and/or its affiliates


Auto Thread Pooling
Provides higher and sustained throughput for OLTP workloads
Blocked TX
Waiting TX
Executing TX

Execution Window DB Table Waiting transactions Execution window DB Table

Admission control

✘ Blocked TXs create resource contention on ✓ Allowing fewer TXs reduces resource contention
executing TXs
Copyright © 2024, Oracle and/or its affiliates
Auto Shape Prediction
Determines the optimal instance type
Workload

MySQL • New statistics


Server • Intelligent sampling
InnoDB
statistics MySQL Autopilot SQL interface Predictions over time • ML models inside
the server
Query Metrics Machine learning model
• Periodic prediction
Traces/Logs
(future) Data aggregation and sampling

Shape: Shape:
MySQL 2.16 MySQL
Shape 4.32
Core Core Core Core Core Core
Heavy change Light
I/O I/O
InnoDB 16 GB InnoDB 32 GB Memory
Memory

Copyright © 2024, Oracle and/or its affiliates


MySQL Autopilot indexing (LA)
Recommends secondary indexes for OLTP workloads

Queries DMLs Queries DMLs

index

CREATE /
DROP
Indexes

Tables

Copyright © 2024, Oracle and/or its affiliates


Autopilot indexing features

MySQL HeatWave

• Considers query and DML


performance
• Create & Drop recommendation
• Explanations for suggestions
• Performance & storage prediction

Copyright © 2024, Oracle and/or its affiliates


Heatwave and Multiple Clouds Architectures

Copyright © 2024, Oracle and/or its affiliates


MySQL HeatWave is optimized for multiple clouds
Maximum flexibility and choice

Optimized for best price performance in each cloud

Copyright © 2024, Oracle and/or its affiliates


MySQL HeatWave on AWS

• MySQL HeatWave runs natively on AWS, optimized for AWS infrastructure

• Data doesn’t leave AWS – saves egress cost, and avoids compliance approvals

• Lowest latency access to MySQL HeatWave

• Tight integration with the AWS ecosystem – S3, CloudWatch, PrivateLink

• Easier migration from other databases (e.g., Amazon Aurora, Redshift, Snowflake)

Combine 5 AWS services into ONE

Copyright © 2024, Oracle and/or its affiliates


MySQL HeatWave on AWS
Data plane, control plane, and console run in AWS

Oracle AWS Account

Console

MySQL user
Control plane
Customer AWS Account

cloud.mysql.com Data

Applications
Transaction Lakehouse
Processing

Machine Warehoue
Data plane Learning Analytics

Copyright © 2024, Oracle and/or its affiliates


Scalable HeatWave storage for AWS service
Data reload in MySQL HeatWave in constant time

AWS S3

• Improves reload performance Table Earlier Now Speedup

• Reload doesn’t impact OLTP performance


LINEITEM 140 min 3.5 min 40x

• Improves availability ORDERS 33 min 43 sec 46x


CUSTOMER 14 min 9 sec 93x
Copyright © 2024, Oracle and/or its affiliates
Roadmap of capabilities on OCI and AWS
As of March 2024 - https://www.oracle.com/mysql/roadmap

Key capabilities Available on OCI Available on AWS


Fully managed service

OLTP and OLAP in MySQL

Query acceleration for analytics and mixed workloads

Machine learning-powered automation (MySQL Autopilot for HeatWave and OLTP)*

Advanced security*

In-database machine learning (HeatWave AutoML)

Scale-out data management

Interactive query and data management console Coming soon


Performance and workload monitoring from the console Coming soon
Interactive MySQL HeatWave AutoML console Coming soon
Adding HeatWave to any MySQL shape Coming soon
MySQL HeatWave Lakehouse Limited availability

* Auto thread pooling and auto shape prediction in MySQL Autopilot as well as the MySQL HeatWave database firewall will be available soon on OCI.

Copyright © 2024, Oracle and/or its affiliates


MySQL HeatWave on Azure
Connecting to MySQL HeatWave on OCI from Azure VNET

• Familiar Azure-native user


experience

• Automated identity, networking,


and monitoring integration

• Private interconnect and


networking with < 2 ms latency

• Use Microsoft Azure services


with MySQL HeatWave

• Collaborative support

https://www.oracle.com/cloud/azure/oracle-database-for-azure

Copyright © 2024, Oracle and/or its affiliates


Enabling hybrid deployments
OLTP on-premises, OLAP in the cloud

Copyright © 2024, Oracle and/or its affiliates


DB system Inbound and Outbound Replication

Cross-region replication
• DB System to DB System

Live Migrations
• Minimize downtime

Hybrid deployments
• On-premises and other cloud vendors
• Disaster Recovery
• Capacity bursting
• HeatWave for Analytics, ML, Lakehouse

Copyright © 2024, Oracle and/or its affiliates


Inbound Replication Filters
Ignore Some of the Changes But Not Others

While migrating one may need to filter some traffic out from the replication stream.
• Ignoring a schema that will remain on premise
• Ignoring custom system objects from other cloud providers

Noteworthy:
• Supports MySQL replication filters
• Console contains handy filter templates
• CLI, SDK and Terraform support

Copyright © 2024, Oracle and/or its affiliates


Available in your data center
OCI Dedicated Region

Self-contained cloud region

MySQL HeatWave and all Oracle public


cloud services in your data center

Public cloud economics and security

Meet data residency and latency


requirements

Copyright © 2024, Oracle and/or its affiliates


Get started with MySQL
HeatWave

Get $300 in credits and try free for 30 days


oracle.com/mysql/free

Migrate to MySQL HeatWave with free expert guidance


Migration program
Request a free MySQL HeatWave workshop
Ask your account manager

Learn more about MySQL HeatWave


oracle.com/mysql
Copyright © 2024, Oracle and/or its affiliates

You might also like