Why You Should Use HybridDB for MySQL for Online and Offline Data Separation

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: HybridDB for MySQL helps you separate online and offline data in a precise, economical, and secure way.

Why Do You Need to Separate Your Data?

You may choose to opt for online and offline data separation to ensure the performance and capacity of the operational database. Additionally, this will help you to reduce the overall data storage cost and avoid the impact of offline data usage on online data utilization.

You can execute the separation by transferring data generated during the early days of the online business system to an offline database for storage. Furthermore, the data stored offline could be critical for business analysis and future planning; therefore, you still would want to access it from time to time.

This article will introduce a practical method through which you can separate online and offline data using HybridDB for MySQL.

Core Tasks

The task center aggregates the group's entire workflow and provides a unified interface to manage task assignment and tracking.

1

Figure 1.

Challenges for Data Separation

• The data size of a single table is often quite large, with more than 40 million records.
• You will need to run extensive queries against multiple tables to meet business needs. As the frequency and complexity of queries increase the SQL slows down as well.

How Can You Transform the System Architecture?

Separating online and offline data helps to avoid different sets of data affecting each other at the data access layer. However, you must synchronize the data in real time to ensure high stability. Make sure you are regularly clearing offline data in the online tables to ensure that the online storage is used properly. Also, ensure to secure the closed loop process from data generation to data elimination.

It is also essential to make sure that the offline data must have enough storage space as you cannot delete the old data. Therefore, you must use proper storage mechanisms and ensure that the system has plenty of storage space.

Additionally, it is important to maintain data query efficiency when dealing with massive amounts of offline data. You cannot afford for the queries to be slow-moving.

After experimenting with various technologies, I would recommend HybridDB for MySQL to separate online and offline data.

Separating Online and Offline Data with HybridDB for MySQL

HybridDB for MySQL is a relational database that supports both OLTP and OLAP (HTAP). HTAP refers to Hybrid Transaction/Analytical Processing. It includes the integration of Transaction Processing (TP) and Analytical Processing to achieve the real-time data transaction and analysis.

Three Features of HybridDB that You Should Know

1.HybridDB for MySQL uses only one copy of data for OLTP and OLAP processing. This solves the need to replicate data multiple times for separate business transactions and data analysis. Additionally, it significantly reduces the cost of data storage.

2.Since HybridDB for MySQL only uses one copy of the data, it saves you from the trouble of loading data between the operational database and the data warehouse. As a result, it significantly shortens the delay and data analysis time and makes real-time analysis decisions possible.

3.It is compatible with MySQL syntax and functions and supports common Oracle analytic functions. Moreover, HybridDB is 100% compatible with TPC-H and TPC-DS testing standards. These factors allow it to reduce development, data migration, and maintenance costs.

You can understand the reason for preferring HybridDB for MySQL by going through the advantages of HybridDB mentioned below.

Advantages of HybridDB

• Supports logs, tracks, and historical data storage.
• Solves the problem of crowded online data
• Addresses the problem of offline data affecting online data when you share the same database
• The solution is mature and widely used in Alibaba Cloud
• Almost completely compliant with MySQL
• Supports synchronization through DTS and ensures the reliability and timeliness of data
• You can expand the storage through linear scaling.

Performance Comparison of HybridDB

Below is a table that illustrates the comparisons of queries against reference data.

2

Table 1. Performance Comparison of HybridDB.

You will notice that MySQL has a faster response time than HybridDB for SQL queries running on small volumes of data. However, as the data size increases it lags far behind HybridDB as the data size increases. Therefore, I recommend MySQL for SQL queries on smaller tables, and HybridDB for MySQL for queries on tables with more than ten thousand records.

Main Application Scenarios for HybridDB

• Storing and Analyzing Big Data: HybridDB for MySQL supports hybrid processing of OLTP and OLAP based on the same copy of data. It removes the hassle of data replication, transferring, loading, and storing massive amounts of data between the operational database and offline data warehouse.

• Supports IoT Development: The IoT industry features an enormous number of data collection points, large data size, and high concurrency demands. Therefore, IoT applications need to use sharding and relevant data distribution technologies to fully support application traffic. The distributed architecture of HybridDB for MySQL shields the sharding details, only providing you with a database connection address and the corresponding logic library. HybridDB for MySQL thus minimizes the development and O&M costs of IoT.

• Stores Historical Data: HybridDB for MySQL can store massive amounts of historical data (up to petabytes) and further save storage space by compressing the data. It also allows you to use ordinary hard drives, which significantly reduces the cost of storing data.

Conclusion

I hope that this blog helped you understand why you should use HybridDB for MySQL to separate online and offline data.
Note: At the time of writing, Alibaba Cloud has not made HybridDB for MySQL available for the international market. Instead, you can have a look at its counterpart, HybridDB for PostgreSQL. If you are interested in discovering the product in advance, visit its product page on the China Mainland portal at https://www.aliyun.com/product/petadata.

相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
关系型数据库 MySQL 数据库
表格存储有类似mysql的use的切换方式吗
表格存储有类似mysql的use的切换方式吗?
63 3
|
6月前
|
存储 关系型数据库 MySQL
使用阿里云的数据传输服务DTS(Data Transmission Service)进行MySQL 5.6到MySQL 8.0的迁移
使用阿里云的数据传输服务DTS(Data Transmission Service)进行MySQL 5.6到MySQL 8.0的迁移
82 1
|
6月前
|
关系型数据库 MySQL
MySQL 报错 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
MySQL 报错 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
920 0
|
SQL 关系型数据库 MySQL
解决:MySQL找不到data文件的位置
解决:MySQL找不到data文件的位置
177 0
|
3月前
|
数据采集 关系型数据库 MySQL
大数据-业务数据采集-FlinkCDC The MySQL server is not configured to use a ROW binlog_format
大数据-业务数据采集-FlinkCDC The MySQL server is not configured to use a ROW binlog_format
41 1
|
6月前
|
SQL 关系型数据库 MySQL
MySQL技能完整学习列表10、数据导入和导出——1、数据导入(LOAD DATA, mysqldump)——2、数据导出(SELECT ... INTO OUTFILE, mysqldump)
MySQL技能完整学习列表10、数据导入和导出——1、数据导入(LOAD DATA, mysqldump)——2、数据导出(SELECT ... INTO OUTFILE, mysqldump)
116 0
|
5月前
|
SQL 关系型数据库 MySQL
MySQL Online DDL(Data Definition Language)
MySQL Online DDL(Data Definition Language)
61 1
|
6月前
|
关系型数据库 MySQL 数据库
使用阿里云的数据传输服务DTS(Data Transmission Service)进行MySQL 5.6到MySQL 8.0的迁移
【2月更文挑战第29天】使用阿里云的数据传输服务DTS(Data Transmission Service)进行MySQL 5.6到MySQL 8.0的迁移
341 2
|
6月前
|
Java 数据库
SpringBoot出现com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime va
SpringBoot出现com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime va
306 0