ApsaraDB RDS for MySQL now supports Hybrid Transactional/Analytical Processing (HTAP) workloads through automatic query routing. Add DuckDB-based analytical read-only instances to your RDS instance and enable query routing through the database proxy — OLAP queries go to the analytical instances, OLTP queries stay on the primary or regular read-only instances.
Effective date
October 14, 2025 (Singapore Time)
How it works
The database proxy estimates the execution cost of each SQL query and routes it to the most suitable instance type, achieving workload isolation without application changes.
Two instance types handle different workloads:
Row-oriented instances (primary instance and regular read-only instances): Use the InnoDB engine. Optimized for high-concurrency Online Transaction Processing (OLTP) read and write requests.
Columnstore instances (DuckDB-based analytical read-only instances): Use the DuckDB engine. Designed for complex Online Analytical Processing (OLAP) queries.
Two routing methods are available:
HTAP-based automatic query routing: The proxy routes OLAP and OLTP queries automatically based on estimated SQL execution cost. Use this method for most workloads.
Manual routing by using hints: Use SQL hints to override automatic routing for specific queries. Use this method when automatic routing does not meet your expectations, or when your MySQL version does not support cost estimation.
Prerequisites
Before enabling HTAP-based automatic query routing, make sure that:
Your RDS instance runs MySQL 8.0 with a minor engine version of 20250731 or later, and a DuckDB-based analytical read-only instance is created.
The database proxy feature is enabled with proxy version 2.25.8 or later.
If your instance's minor engine version or database proxy version does not meet the requirements, update the minor engine version or upgrade the database proxy version.
Billing
HTAP-based automatic query routing is free of charge. Charges apply only for the DuckDB-based analytical read-only instances that handle OLAP queries. See the buy page for pricing details.
Usage notes
The latency threshold and consistency level configured for the database proxy also apply to DuckDB-based read-only instances.
When enabling HTAP-based automatic query routing on a primary instance, set the Read/Write Splitting Attribute of the proxy endpoint to Read/Write.
The read weights of DuckDB-based analytical read-only instances affect only load balancing among those instances — they do not affect routing logic between row-oriented and columnstore instances.
If all DuckDB-based analytical read-only instances are at full capacity, subsequent analytical requests are queued.
If Custom is selected for Read Weight Allocation, the read weight of new DuckDB-based analytical read-only instances is 0 by default. Configure the weight manually after adding the instance.
To configure the latency threshold, consistency level, read/write attribute, and read weight of the database proxy, see Configure database proxy.