ALTER TABLE SET FORMAT

Sets the storage format for a table's partitions to NATIVE or PARQUET.

Syntax

ALTER TABLE tableName SET FORMAT { NATIVE | PARQUET };

Description

ALTER TABLE SET FORMAT changes the storage format used for a table's partitions:

  • NATIVE (default): QuestDB's native column format.
  • PARQUET: partitions are stored as Parquet.

The new format applies to partitions written after the statement runs. Existing partitions are not converted. To convert specific existing partitions in place, use in-place Parquet conversion.

FORMAT PARQUET is only supported on partitioned WAL tables.

note

Out-of-order writes into a Parquet partition are more expensive than into a native partition.

Examples

Store new partitions as Parquet:

ALTER TABLE trades SET FORMAT PARQUET;

Switch back to the native format:

ALTER TABLE trades SET FORMAT NATIVE;

To set the format when creating a table, see CREATE TABLE — Partition format.