All Products
Search
Document Center

AnalyticDB:Row store engine

Last Updated:Mar 28, 2026

The row store engine is a high-concurrency, real-time engine for row-oriented tables in AnalyticDB for MySQL. It is optimized for primary key point queries and multi-column projections where low latency matters more than analytical throughput.

When to use the row store engine

Choose the row store engine when your workload involves:

  • High-concurrency point queries: Looking up individual rows by primary key at thousands of queries per second (QPS)

  • Real-time reads and writes: Frequent INSERT, UPDATE, and DELETE operations with immediate read-after-write consistency

  • Multi-column projections on small result sets: Retrieving a subset of columns for a small number of rows

If your workload is primarily analytical — large scans, aggregations, or joins over millions of rows — use the columnar engine instead.

Prerequisites

Before you begin, ensure that you have:

  • An AnalyticDB for MySQL Enterprise Edition, Basic Edition, or Data Lakehouse Edition cluster

  • A resource group created in the cluster with task type Interactive and engine type Serving

  • Cluster kernel version 3.2.5 or later

    Note To view or update the minor version, go to the Configuration Information section on the Cluster Information page in the AnalyticDB for MySQL console.

Billing

The row store engine uses pay-as-you-go pricing for both compute and storage:

  • Compute: Billed based on the number of AnalyticDB compute units (ACUs) and the unit price of the Serving resource group

  • Storage: Billed based on the hot data storage price

For pricing details, see Pricing.

Supported data types

CategoryTypesNotes
BooleanbooleanValues: true, false
Numerictinyint, smallint, int, bigint, float, doubledecimal is not supported. To automatically convert decimal to double, run set ADB_CONFIG ROW_STORE_DECIMAL_TO_DOUBLE=true. This may cause a loss of precision.
Charactervarchar, binary, blob
Timedate, time, datetime, timestamp
Complexpoint, array<int>, array<array<int>>, map<varchar, int>Supports basic read and write only. Stored in binary format and cannot be used in function calculations.

Primary keys support: boolean, tinyint, smallint, int, bigint, varchar, binary, blob, date, time, datetime, timestamp.

Create a row-oriented table

Specify ENGINE = 'row_store' in your CREATE TABLE statement.

Basic example:

CREATE DATABASE test_db;

CREATE TABLE test_db.row_store_table
(
    a int NOT NULL,
    b int,
    c varchar,
    PRIMARY KEY(a)
)
ENGINE = 'row_store'
TABLE_PROPERTIES = '{"row_store_ttl": 1}';

With manually created indexes:

CREATE TABLE test_db.row_store_table
(
    a int NOT NULL,
    b int,
    c varchar,
    PRIMARY KEY(a),
    INDEX c_idx(c),
    INDEX bc_idx(b, c)
)
ENGINE = 'row_store';

With a full-text index on a string column:

CREATE TABLE test_db.row_store_table
(
    a int NOT NULL,
    b int,
    c varchar,
    PRIMARY KEY(a),
    FULLTEXT INDEX c_idx(c)
)
ENGINE = 'row_store';

Data operations

The following DML operations are supported:

OperationBehavior on duplicate primary key
INSERT INTODuplicate rows are ignored
REPLACE INTOOld row is overwritten with the new data
INSERT ON DUPLICATE KEY UPDATE
INSERT SELECT FROM
INSERT OVERWRITE SELECT
UPDATE
DELETE

Schema changes

Add or remove columns:

-- Add columns
ALTER TABLE test_db.row_store_table
  ADD COLUMN bool boolean,
  ADD COLUMN STR varchar;

-- Remove a column
ALTER TABLE test_db.row_store_table
  DROP COLUMN bool;

Add or remove indexes:

-- Add an index
ALTER TABLE test_db.row_store_table
  ADD INDEX c_idx(c);

-- Remove an index
ALTER TABLE test_db.row_store_table
  DROP INDEX c_idx;

Truncate or drop a table:

TRUNCATE TABLE test_db.row_store_table;

DROP TABLE test_db.row_store_table;

Limits

ConstraintDetails
Primary keyRequired; cannot be empty; maximum 4 columns
Column typesCannot be modified after the table is created
decimal typeNot natively supported; use set ADB_CONFIG ROW_STORE_DECIMAL_TO_DOUBLE=true to convert to double (precision loss may occur)
Complex typesRead/write only; cannot be used in function calculations
Table lifecycle (TTL)Minimum unit is one day

Performance

On the TPC-H 10 GB dataset, the row store engine delivers over 10x improvement in point query throughput and more than 80% reduction in response time (RT).

PK point query (`WHERE pk = <value>`):

ConcurrencyQPSRT
505,259/s9 ms
10010,481/s9 ms
30031,347/s9 ms
50042,257/s11 ms
1,00082,103/s12 ms

Multiple PK point query (`WHERE pk IN (x, y, z)`):

ConcurrencyQPSRT
1002,611/s38 ms
3004,422/s67 ms
5006,830/s72 ms
1,0006,076/s163 ms