If you are using MySQL Database & you have too long-running select queries it is probably, because of a lack of relevant indexes, an uncertain schema that leads to poor queries, or insufficient hardware.
It means, sometimes even if you doing it right, the query execution time could be too long regarding what the application or your users expect. It is often true for reporting, real-time analytics, or Business intelligence (BI) queries.
To come out from this problem, Oracle developed HeatWave, which allows you to simply run high-performance analytics against your database.
This blog post gives an understanding of HeatWave.
Topics we’ll cover:
- Introduction
- HeatWave Architecture
- Adding a HeatWave Cluster to a Database System
- Managing HeatWave Cluster
Introduction to MySQL HeatWave Service
HeatWave is a new integrated, high-performance, in-memory query accelerator for MySQL Database Service that accelerates MySQL performance by orders of magnitude for analytics and transactional queries.
It scales bent thousands of cores, is 1100X faster than Amazon Aurora, and 2.7X faster than Amazon Redshift at one-third the value.
MySQL Database Service, with HeatWave, is that the only service that permits database admins and app developers to run OLTP and OLAP workloads directly from their database. The service is optimized for and exclusively available in Oracle Cloud Infrastructure (OCI).
HeatWave Architecture
A HeatWave cluster includes a MySQL DB System node and two or more HeatWave nodes. The DB System node features a HeatWave plugin that’s responsible for cluster management, loading data into the HeatWave cluster, query data using HeatWave Cluster, and returning query results to the MySQL DB System. HeatWave nodes store data in memory and process analytics queries.
The number of HeatWave nodes required depends on the dimensions of your data and therefore the amount of compression that’s achieved when loading the data into the HeatWave cluster.
How to Add HeatWave Cluster into Database System
Before adding HeatWave Cluster into the Database System you must Ensure the DB System was created using MySQL.HeatWave.VM.Standard.E3 shape.
2. Add your HeatWave cluster in one of the following ways:
- Select the DB System and choose Add HeatWave Cluster from the Actions icon (three dots) on the same line as your DB System.
- Open the DB System and select HeatWave Cluster from the Resources list. On the HeatWave Cluster Information frame, select Add HeatWave Cluster.
3. On the Add HeatWave Cluster dialog, provide the following details:
-
- Shape: The shape for the HeatWave nodes. Shapes are resource templates, defining the number of OCPUs, RAM, and so on. Click Change Shape to select a shape for your HeatWave nodes. You must use the same shape as that used by the associated DB System.
- Node Count: The number of HeatWave nodes to create. Optionally, click Estimate Node Count to generate a node count estimate to determine the number of nodes required based on the shape you selected and the size of your data.
4.Click Add HeatWave Cluster to create the HeatWave cluster.
Managing HeatWave Cluster
1.How to load Data into the HeatWave Cluster
- Before loading data into the HeatWave cluster, the data/tables have to be prepared.
- Preparing tables involves:
- Modifying table definitions to exclude certain columns, define string column encodings, add data placement keys.
- Specify HeatWave (RAPID) as the secondary engine for the table (Note that InnoDB is the primary engine).
- Loading a table into a HeatWave cluster requires executing an ALTER TABLE operation with the SECONDARY_LOAD keyword.
- mysql> ALTER TABLE sales SECONDARY_UNLOAD;
2. How to query data using the HeatWave cluster
- If a query accesses a table that is not loaded, the query is not offloaded to the HeatWave cluster for processing
- Queries that meet certain prerequisites are automatically offloaded from the MySQL DB System to the HeatWave cluster for accelerated processing
- Results are returned to the MySQL DB System node and to the MySQL client or application that issued the query
- When a table is loaded, data is sliced horizontally and distributed among HeatWave nodes
- After a table is loaded, changes to a table’s data on the MySQL DB System node are automatically propagated to the HeatWave nodes
- No user action is required to keep data synchronized
Reference links:
- MySQL Database as a Service in Oracle Cloud
- NoSQL Database as a Service in Oracle Cloud
- Oracle Cloud Database Services Specialist 2021 Certification[1Z0-1093-21]
- Databases In Oracle Cloud (OCI)
The post MySQL HeatWave: Oracle Cloud Feature to Fastest your query appeared first on Cloud Training Program.