All Products
Search
Document Center

PolarDB:Automatic IMCI-based query acceleration

Last Updated:Feb 27, 2026

When analytical or mixed workloads generate slow queries, manually identifying each query and creating indexes is time-consuming. Automatic IMCI-based query acceleration monitors slow queries through SQL Trace and creates in-memory column indexes (IMCIs) on the relevant tables. The system continuously adjusts acceleration policies based on workload patterns, reducing manual tuning.

How it works

After you enable automatic IMCI-based query acceleration, PolarDB records slow queries through SQL Trace and creates IMCIs on the relevant tables. IMCIs are stored on read-only IMCI nodes, which handle accelerated queries separately from the primary row-store nodes.

The feature uses nonblocking DDL to add IMCIs. If the MDL-X lock is not acquired, new transactions can still access the target table, so index creation does not block your workload.

Supported editions and versions

EditionRequirements
Enterprise EditionCluster Edition. MySQL 8.0.1 (revision 8.0.1.1.45.2 or later) or MySQL 8.0.2 (revision 8.0.2.2.27 or later)
Standard EditionX86 CPU architecture. MySQL 8.0.1 (revision 8.0.1.1.45.2 or later)

The following configurations are not supported:

  • Multi-master Cluster (Database/Table) Edition clusters

  • Serverless clusters

Note

To check your cluster's engine version, see Query the engine version.

Enable automatic IMCI-based query acceleration

Prerequisites

Before you begin, make sure that you have:

  • A PolarDB for MySQL cluster that meets the edition and version requirements listed above

  • At least one read-only IMCI node in the cluster (you can add one during or after enablement)

Procedure

  1. Log on to the PolarDB console, click Clusters in the navigation pane on the left, select the Region where the cluster is deployed, and then click the cluster ID to open the cluster details page.

  2. On the Basic Information page, click Enable for the Automatic IMCI-based Query Acceleration option. Enable button on the Basic Information page

  3. In the Enable Automatic IMCI-based Query Acceleration dialog box, click OK. What happens next depends on your cluster configuration:

    • Cluster already has read-only IMCI nodes -- The feature is enabled immediately. Confirmation dialog for clusters with IMCI nodes

    • Cluster does not have read-only IMCI nodes -- After you click OK, you are redirected to the page for adding read-only IMCI nodes. Confirmation dialog for clusters without IMCI nodes

Note

If your cluster does not have a read-only IMCI node, you can add one now or later. For instructions, see Add a read-only IMCI node. The feature takes effect only after at least one read-only IMCI node is available.

Disable automatic IMCI-based query acceleration

  1. Log on to the PolarDB console, click Clusters in the navigation pane on the left, select the Region where the cluster is deployed, and then click the cluster ID to open the cluster details page.

  2. On the Basic Information page, click Disable for the Automatic IMCI-based Query Acceleration option. Disable button on the Basic Information page

  3. In the Disable Automatic IMCI-based Query Acceleration dialog box, click OK. Disable confirmation dialog

Note

Disabling the feature stops automatic IMCI creation, but your existing read-only IMCI nodes, IMCIs, and related data are retained. To remove them, delete the read-only IMCI nodes in the console and delete IMCIs with DDL statements.

Billing and resource usage

ItemDetails
Read-only IMCI nodesBilled as standard compute nodes. For details, see Billing rules of compute nodes.
IMCI storageIMCIs created by the system occupy storage space.
SQL Trace overheadSQL Trace, used to record slow query execution history, typically consumes no more than 3% of database node resources.
Behavior without IMCI nodesWithout a read-only IMCI node, the system records slow query history through SQL Trace but does not create IMCIs for acceleration.