All Products
Search
Document Center

PolarDB:Parameters

Last Updated:Jan 07, 2026

This topic describes the parameters and data types for columnstore indexes.

Configuration parameters

Parameter

Valid values

Default value

Description

polar_csi.enable_query

on|off

off

Specifies whether query statements can use columnstore indexes. Valid values:

  • off (default): Query statements cannot use columnstore indexes.

  • on: Query statements can use columnstore indexes.

polar_csi.cost_threshold

1 to 1000000000

50000

If the query cost is less than this threshold, the query statement does not use the columnstore index for acceleration. Adjust the value based on your actual business workload.

  • If this value is too high, time-consuming SQL statements cannot use the columnstore index, which slows down queries.

  • If this value is too low, simple SQL statements use the columnstore index, which reduces system concurrency.

Note
  • Use EXPLAIN or EXPLAIN ANALYZE to query and analyze the cost of an SQL statement.

  • PostgreSQL 14: The default value is changed to 50000 in minor engine version 2.0.14.13.28.0 and later. The previous default value was 1000.

  • PostgreSQL 16: The default value is changed to 50000 in minor engine version 2.0.16.10.12.0 and later. The previous default value was 1000.

polar_csi.exec_parallel

1 to 512

2

The degree of parallelism for the columnstore index. This is the amount of CPU resources that a single SQL statement can use. In general, a higher degree of parallelism provides better performance.

The actual value depends on the cluster resource specifications. Adjust this parameter based on your cluster specifications. The value should not exceed the number of CPU cores on the compute node.

polar_csi.memory_limit

1 to 1048576

4096

The amount of memory that the columnstore index can use. Unit: MB.

A larger memory threshold results in faster index creation. Adjust this parameter based on your cluster specifications. The value should not exceed 25% of the cluster memory. Otherwise, an out-of-memory (OOM) error may occur.

Note
  • PostgreSQL 14: The default value is changed to 4096 in minor engine version 2.0.14.19.40.0 and later. The previous default value was 1024.

  • PostgreSQL 16: The default value is changed to 4096 in minor engine version 2.0.16.10.12.0 and later. The previous default value was 1024.

polar_csi.flush_count

2048 to 20480000

204800

The number of rows to commit in a batch when you create an index.

Increasing the number of rows can improve creation efficiency but also consumes more memory.

polar_csi.update_interval

0 to 3600

1

The interval at which to periodically update the real-time row and column data. Unit: seconds.

Increasing the update interval lets you merge small transactions of the same type. This improves data update efficiency when there are many transactions.

Note
  • PostgreSQL 14: This parameter is added in minor engine version 2.0.14.13.28.0 and later to improve the real-time performance of the columnstore index.

  • PostgreSQL 16: This parameter is added in minor engine version 2.0.16.10.12.0 and later to improve the real-time performance of the columnstore index.

polar_csi.update_batch_count

1024 to 4294967295

100000

The threshold for the number of rows in a batch update.

The maximum number of rows in an update transaction. Increasing this threshold can improve data update efficiency.

Note
  • PostgreSQL 14: This parameter is added in minor engine version 2.0.14.13.28.0 and later to improve the real-time performance of the columnstore index.

  • PostgreSQL 16: This parameter is added in minor engine version 2.0.16.10.12.0 and later to improve the real-time performance of the columnstore index.

polar_csi.forward_replay_wait

on|off

off

The query consistency level for columnstore index data. Valid values:

  • off: Eventual consistency. The data in the columnstore index may lag behind the data in the row store.

  • on: Strong consistency. A query waits for the column store data to be replayed to the latest version before it is executed. If write pressure is high, enabling this parameter may cause long wait times.

polar_csi.forward_replay_wait_lsn_diff

0 to INT_MAX

0

The allowed synchronization latency in LSN size between the row store and column store. If the latency exceeds this threshold, the columnstore engine is no longer used. Unit: BYTE.

Note
  • This parameter takes effect only when polar_csi.forward_replay_wait is enabled.

  • This parameter is applicable only to the following versions:

    • PostgreSQL 14: Minor engine version 2.0.14.19.40.0 and later.

    • PostgreSQL 16: Minor engine version 2.0.16.10.12.0 and later.

    • PostgreSQL 15 and PostgreSQL 17: Same as the scope of application.

polar_csi.sync_addcolumn

on|off

off

Specifies whether to synchronize Add Column operations to the columnstore index.

Note

This parameter is applicable only to the following versions:

  • PostgreSQL 14: Minor engine version 2.0.14.19.40.0 and later.

  • PostgreSQL 16: Minor engine version 2.0.16.10.12.0 and later.

  • PostgreSQL 15 and PostgreSQL 17: Same as the scope of application.

Data types

Category

Data type

Basic data types

BOOLEAN, ARRAY, BIT, UUID

String and binary types

BPCHAR, CHAR, VARCHAR, TEXT, NAME, BYTEA

Date and time types

DATE, TIME, TIMESTAMP, TIMESTAMPTZ, INTERVAL

Numeric types

BIGINT, DECIMAL, DOUBLE PRECISION, FLOAT4, FLOAT8, INTEGER, NUMERIC, REAL, SERIAL, SHORT, SMALLINT

Composite types

JSON, JSONB, ENUM, BITSTRING, VARCHAR[], TEXT[]

Note
  • PostgreSQL 14: The BITSTRING, VARCHAR[], and TEXT[] data types are added in minor engine version 2.0.14.19.40.0 and later.

  • PostgreSQL 16: The BITSTRING, VARCHAR[], and TEXT[] data types are added in minor engine version 2.0.16.10.12.0 and later.