All Products
Search
Document Center

ApsaraDB RDS:Add a DuckDB-based analytical read-only instance

Last Updated:Sep 16, 2026

ApsaraDB RDS for MySQL DuckDB-based analytical read-only instances use column store and vectorization to improve the performance of complex analytic queries by up to 100 times. These instances provide real-time analytics for large-scale data scenarios and help you make data-driven decisions faster.

Scenarios

The primary instance must meet the following requirements to add a DuckDB-based analytical read-only instance:

  • Database version: MySQL 5.7 or 8.0

  • Storage type: local SSD, Premium ESSD, or ESSD

    Note

    Currently, you can add a DuckDB-based analytical read-only instance only to a primary instance that uses a local SSD in one of the following regions: China (Beijing), China (Shanghai), China (Hangzhou), China (Shenzhen), China (Qingdao), Singapore, and China (Hong Kong). For the actual availability, see the buy page.

  • Storage capacity: 10 GB to 32,000 GB.

  • Data archiving: If the primary instance runs MySQL 8.0, its data archiving feature must be disabled.

Billing

The billing for DuckDB-based analytical read-only instances is the same as for regular read-only instances. The cost is affected by factors such as the product series, instance type, storage type, and storage capacity. The actual cost is displayed on the purchase page.

Notes

  • Instance creation time: Creating a DuckDB-based analytical read-only instance takes longer than a regular read-only instance because it involves converting the storage engine of all tables to the DuckDB engine. The creation time depends on the data volume of the primary instance.

  • Impact on the primary instance: Adding a DuckDB-based analytical read-only instance does not interrupt or affect normal read and write operations on the primary instance. During initialization, the system creates the new instance from a full backup of the primary instance and converts the storage engine of the full data. The system then continuously synchronizes incremental data from the primary instance by using binary logging.

  • Foreign key deletion: Foreign keys are automatically deleted during the creation of a DuckDB-based analytical read-only instance. DuckDB-based analytical read-only instances do not have foreign key constraints.

  • Table schema limits: DuckDB-based analytical read-only instances support only tables that use the UTF8 or UTF8MB4 character set. Partitioned tables and tables without a business primary key are not supported. A business primary key is a defined primary key or a UNIQUE constraint on a non-null field.

    Note

    For unsupported tables, the engine remains the InnoDB engine in the DuckDB-based analytical read-only instance. You can run the following SQL statement to query the list of incompatible tables.

    SELECT table_schema, table_name, engine 
    FROM information_schema.tables 
    WHERE table_schema NOT IN ('mysql', 'sys') AND engine = 'InnoDB';
  • Compatibility limits: For more information, see Compatibility of DuckDB analytic instances.

Create a DuckDB-based analytical read-only instance

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select a region. Then, click the ID of the target instance.

  2. On the Basic Information page, go to the Instance Distribution section. Click Add to the right of DuckDB Analytic Instance.

  3. Configure the DuckDB-based analytical read-only instance. The following table describes the main parameters.

    Parameter

    Description

    Billing Method

    Subscription and pay-as-you-go are supported. Serverless is not supported.

    Series

    Basic Series and High-availability Series.

    Storage type

    Same as the primary instance.

    Product Type

    Only Standard Edition is supported.

    Primary Zone

    You can select only a zone in the same region as the primary instance.

    Deployment Method

    • Single-zone Deployment: The primary and secondary nodes of the analytic read-only instance are in the same zone.

    • Multi-zone Deployment: The primary and secondary nodes of the analytic read-only instance are in different zones within the same region. This provides cross-zone disaster recovery at no extra charge. If you select this option, you must also configure the zone for the secondary node.

    Instance Type

    Dedicated and General-purpose instance types are supported. For more information, see DuckDB-based analytical read-only instance types.

    Database Proxy

    After you enable the General-purpose database proxy (free of charge), the system can automatically distribute hybrid transactional and analytical processing (HTAP) requests. Online analytical processing (OLAP) query requests are routed to the DuckDB-based analytical read-only instance, and online transactional processing (OLTP) requests are routed to the primary instance or a regular read-only instance.

    Storage Capacity

    The storage capacity of the analytic read-only instance must be at least half the storage capacity of the primary instance.

  4. Click Next: Instance Configurations. Configure the network and resource group for the instance. The following table describes the main parameters.

    Parameter

    Description

    VPC

    The VPC is the same as that of the primary instance by default and cannot be changed.

    VSwitch of Primary Node

    Use the default primary vSwitch or select one as needed.

    Resource Group

    The resource group is the same as that of the primary instance by default and cannot be changed.

  5. Click Next: Confirm Order.

  6. Confirm the Parameter Settings, select a Quantity, click Confirm Order, and complete the payment.

    If you select the subscription billing method, you must also select a Subscription Duration. We recommend that you select Auto-renewal to prevent service interruptions that are caused by an overdue payment.

  7. After a period of time, find the primary instance on the Instances page. Click the arrow to the left of the instance ID to view the DuckDB-based analytical read-only instance that is attached to the primary instance.

Connect to a DuckDB-based analytical read-only instance

(Recommended) Connect through a database proxy

If your business involves both high-concurrency online transactional processing (OLTP) and complex online analytical processing (OLAP), you can use a database proxy to enable automatic request distribution for HTAP. The database proxy node estimates the execution cost of SQL statements. It automatically routes OLAP query requests to the DuckDB-based analytical read-only instance and OLTP query requests to the primary instance or a regular read-only instance. You do not need to manually classify database requests on the client side.

  1. Add a DuckDB-based analytical read-only instance to the ApsaraDB RDS for MySQL primary instance.

  2. Enable the General-purpose database proxy for the primary instance.

  3. Enable automatic request distribution for HTAP for the primary instance.

  4. Connect to the database using the database proxy endpoint. The database proxy automatically distributes requests to the most suitable instance type based on the estimated execution cost of SQL queries.

Connect directly

A DuckDB-based analytical read-only instance has an independent endpoint. If you only need to process OLAP query requests, you can use this endpoint to connect directly to the instance.

  1. Log on to the ApsaraDB RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select a region.

  2. On the Instances page, find the primary instance. Click the arrow to the left of the instance ID to view the DuckDB-based analytical read-only instance that is attached to the primary instance.

  3. Click the ID of the DuckDB-based analytical read-only instance to go to the details page. In the Basic Information > Network Type section, click View Endpoint Details to obtain the endpoint.

    By default, ApsaraDB RDS instances provide an internal endpoint. To access the instance over the internet, first apply for a public endpoint, and then connect to the DuckDB-based analytical read-only instance.

References and API operations

FAQ

  • Q: How do I enable the binlog feature for a DuckDB-based analytical read-only instance?

    A: If you need to subscribe to binlogs, set the log_slave_updates parameter of the DuckDB-based analytical read-only instance to ON, or subscribe to the binlog of the primary instance.