Skip to main content
This guide explains the compression codecs available in Firebolt, helping you understand what each one does, when to use them, and how they perform with different types of data.
For practical examples, getting started guidance, and compression best practices, see the Table and Column Compression overview.

Supported codecs

LZ4

Description: Fast lossless compression algorithm optimized for speed over compression ratio. This is the default compression codec in Firebolt. Performance characteristics:
  • Compression speed: Very fast
  • Decompression speed: Very fast
  • Typical compression ratio: Good
  • CPU usage: Very low
Best for:
  • High-throughput data ingestion
  • Frequently accessed data requiring fast queries
  • Real-time analytics workloads
  • When CPU resources are limited
Data type compatibility: All types

ZSTD (Zstandard)

Description: Modern compression algorithm providing excellent balance between compression ratio and speed with configurable compression levels. Parameters:
  • COMPRESSION_LEVEL: Compression level (1-22, default: 1)
    • Levels 1-3: Fast compression, good for online workloads
    • Levels 4-10: Balanced performance
    • Levels 11-22: High compression, slower writes
Performance characteristics by level:
LevelCompression SpeedCompression RatioUse Case
1FastGoodReal-time data
3FastBetterGeneral workloads
7ModerateBetterBalanced storage/speed
15SlowExcellentArchival data
ZSTD compression levels higher than 3 typically reach the point of diminishing returns for most workloads.
Best for:
  • General analytics workloads (levels 1-3)
  • Archival data storage (levels 10+)
  • Data with good compressibility (JSON, text, logs)
Data type compatibility: All types Examples:
-- Fast ZSTD for hot data
CREATE TABLE logs (
    log_data TEXT
) WITH (COMPRESSION = zstd, COMPRESSION_LEVEL = 1);

-- Higher compression for less frequently accessed data
CREATE TABLE archived_events (
    event_data TEXT
) WITH (COMPRESSION = zstd, COMPRESSION_LEVEL = 3);

See also