Apache ORC (Optimized Row Columnar) is a columnar storage format created for the Hadoop and Hive ecosystem. Like Parquet, it stores data by column for efficient analytic scans, strong compression, and predicate pushdown. ORC's distinguishing features are its built-in lightweight indexes and its first-class support for ACID transactions inside Hive.

File structure: stripes, indexes, and the footer

An ORC file is split into stripes (typically ~64MB), each holding index data, the column data, and a stripe footer. The file footer records the schema, stripe locations, and file-level statistics. Inside each stripe, ORC keeps row-level indexes every 10,000 rows with min/max stats, so an engine can skip not just whole stripes but row ranges within a stripe. ORC also supports bloom filters per column, which let it skip stripes for equality lookups on high-cardinality columns where min/max ranges are useless.

Compression and encoding

ORC applies type-specific encoding (run-length for integers, dictionary for strings) and then a codec - Zlib (default, good ratio) or Snappy/LZO (faster). It typically achieves slightly higher compression than Parquet on the same data, which is part of why Hive-centric platforms favor it. Add a bloom filter on columns you do point lookups on:

CREATE TABLE events (id BIGINT, region STRING, amount DOUBLE)
STORED AS ORC
TBLPROPERTIES (
  "orc.compress" = "ZLIB",
  "orc.bloom.filter.columns" = "id",
  "orc.row.index.stride" = "10000"
);

ACID in Hive

ORC is the storage format behind Hive's transactional tables. Hive implements row-level INSERT, UPDATE, and DELETE by writing delta files alongside the base ORC files and merging them at read time, with periodic compaction to fold deltas back into the base. This predates the open table formats and is tied to Hive; for engine-neutral transactions on a lake, Iceberg or Delta Lake are the modern choice.

ORC vs Parquet

The two are close cousins with overlapping designs. ORC tends to compress a little better and has richer built-in indexing (row-index strides, bloom filters); Parquet has broader adoption across non-Hadoop engines and is the format most cloud warehouses and table formats standardize on. In practice the decision is dictated by your stack: Hive/Hortonworks-lineage and some Spark setups lean ORC, while Spark-on-cloud, Trino, and warehouse external tables lean Parquet. Both deliver columnar pruning and good compression; you rarely choose ORC for a greenfield cloud lake today unless an existing Hive estate calls for it.

When you'll meet it

  • Migrating or maintaining a Hive data warehouse, where ORC is the native ACID format.
  • Reading legacy Hadoop datasets that were written as ORC.
  • Spark jobs in ecosystems standardized on ORC for its compression edge.