All Products
Search
Document Center

ApsaraDB RDS:Overview of DuckDB-based analytical read-only instances

Last Updated:Mar 28, 2026

ApsaraDB RDS for MySQL analytical read-only instances use a built-in DuckDB engine with columnar storage and vectorized execution to handle complex analytical queries at speeds up to 100 times faster than InnoDB. Run your existing MySQL queries directly on real-time data — no schema changes, no external OLAP (online analytical processing) pipeline required.

Key features

High-performance analytics

The DuckDB engine combines columnar storage, vectorized execution, just-in-time (JIT) compilation, efficient memory management, and parallel processing to accelerate complex analytical queries. In TPC-H sf-100 benchmarks, a DuckDB-based analytical read-only instance completed all 22 queries in 15.31 seconds total — compared to 25,234.31 seconds for InnoDB and 80.01 seconds for ClickHouse Community Edition.

MySQL compatibility

The analytical read-only instance is 100% compatible with the MySQL protocol and data types, and supports over 99.9% of SQL syntax, including Data Definition Language (DDL). Submit your existing queries without modification — the instance handles the rest.

Real-time data synchronization

Data flows from the primary instance to the analytical read-only instance through two phases:

  • Historical data: When the analytical read-only instance is created, the system copies all existing data from the primary instance and converts it to the DuckDB engine format automatically.

  • Incremental data: After creation, a native binary logging replication channel syncs new writes in real time. The data stays within RDS — no external synchronization tools such as DTS are needed, and there are no extra fees for data synchronization.

Resource isolation

Analytical queries run on the dedicated analytical read-only instance, keeping the primary instance and standard read-only instances free for transaction processing. Heavy queries on one side have no impact on the other.

Use cases

  • Aggregation and analysis: Run aggregate queries on large datasets such as log data with significantly lower latency than row-based storage.

  • Multi-table JOIN queries: Execute complex multi-table JOIN queries that are impractical on a standard MySQL instance.

How it compares

Use a DuckDB-based analytical read-only instance when you need strong analytical query performance with no changes to your existing MySQL setup. The following table summarizes key differences across instance types.

DuckDB-based analytical read-only instanceStandard read-only instanceOLAP database
Best forComplex analytical queriesTransaction processingComplex analytical queries
Query performanceStrongLowStrong
Data sync methodNative binary logging replicationNative binary logging replicationDTS data synchronization link
MySQL protocolFully compatibleFully compatibleIncompatible
SQL syntaxHighly compatible (over 99.9%)Fully compatibleIncompatible (requires SQL rewrite)
DDLHighly compatibleFully compatiblePartially compatible
Data typesFully compatibleFully compatibleIncompatible (requires field mapping)
O&M costsLow (integrated instance)Low (integrated instance)High (requires extra maintenance for the database and synchronization link)

Appendix: performance benchmark

The following results use the standard TPC-H benchmark to demonstrate the analytical query performance of a DuckDB-based analytical read-only instance.

Test environment

ItemDetails
DatasetTPC-H sf-100, 100 GB, sourced from the official DuckDB website
Host specs32-core CPU, 128 GB memory, enterprise SSD storage (same ECS host for all instances)
Comparison instancesApsaraDB RDS for MySQL 8.0.36 (InnoDB engine), ClickHouse Community Edition 25.3
Test method3 warm-up rounds (not counted) + 3 official rounds; final result is the average of official rounds

Test results

The following table shows the running time (in seconds) for each TPC-H sf-100 query.

Query IDDuckDB-based analytical read-only instanceStandard ApsaraDB RDS for MySQL instance (InnoDB engine)ClickHouse
q10.921134.253.47
q20.1518001.52
q30.53802.943.65
q40.461000.452.77
q50.518005.38
q60.22566.730.73
q70.5918006.06
q80.6818006.99
q91.44180013.29
q100.91894.353.22
q110.1179.631.1
q120.44734.351.69
q131.59454.155.85
q140.38574.070.83
q150.31568.431.53
q160.3263.560.52
q170.8918007.96
q181.5918003.11
q190.818002.96
q200.5118003.38
q211.641800Out of memory
q220.33361.44
Total15.3125234.3180.01

Test conclusions

DuckDB-based analytical read-only instance vs. ApsaraDB RDS for MySQL instance (InnoDB engine)

imageimage

The DuckDB-based analytical read-only instance completed all 22 queries in 15.31 seconds. The InnoDB instance took 25,234.31 seconds — a performance gap of more than 1,000x. Nine queries (q5, q7, q8, q9, q17, q18, q19, q20, q21) timed out on InnoDB at the 1,800-second limit and could not complete.

DuckDB-based analytical read-only instance vs. ClickHouse

imageimage

ClickHouse completed the benchmark in 80.01 seconds. The DuckDB-based analytical read-only instance finished in 15.31 seconds and outperformed ClickHouse on every query that both instances completed. ClickHouse failed q21 with a Memory limit exceeded error.

What's next