---
title: "ORC"
description: "ORC (Optimized Row Columnar) is a columnar file format originally built for Hadoop and Hive, designed for fast reads, high compression, and efficient predicate pushdown on large analytical datasets."
canonical: "https://motherduck.com/glossary/orc/"
related:
  - title: "DuckLake Architecture Deep Dive"
    url: "https://motherduck.com/blog/ducklake-architecture-deep-dive/"
  - title: "Parquet | MotherDuck Docs"
    url: "https://motherduck.com/docs/integrations/file-formats/parquet/"
  - title: "Understanding DuckLake: A Table Format with a Modern Architecture | MotherDuck"
    url: "https://motherduck.com/videos/understanding-ducklake-a-table-format-with-a-modern-architecture/"
gated_asset:
  title: "DuckLake: The Lakehouse Table Format"
  url: "https://motherduck.com/lp/ducklake-lakehouse-table-format-book-full/"
---

# ORC

> ORC (Optimized Row Columnar) is a columnar file format originally built for Hadoop and Hive, designed for fast reads, high compression, and efficient predicate pushdown on large analytical datasets.

## Overview
ORC (Optimized Row Columnar) is a columnar storage format developed by Hortonworks and Facebook to improve on the limitations of earlier Hive file formats. Like Parquet, it stores data column by column rather than row by row, which improves compression and lets query engines read only the columns a query needs.

## Structure
An ORC file is divided into "stripes," each holding a group of rows. Within a stripe, data is organized by column, along with lightweight indexes and statistics (min/max values, row counts) for each column. Query engines use these statistics to skip entire stripes that can't match a filter, similar to Parquet's row-group statistics.

## ORC vs. Parquet
ORC and Parquet solve the same basic problem and are often interchangeable in practice. ORC has historically been closely tied to the Hive and Trino/Presto ecosystems, with some Hive-specific optimizations (like built-in support for Hive's ACID transaction format), while Parquet has broader adoption across Spark, pandas, Arrow-based tools, and cloud analytics engines. Neither format is a table format on its own — both are typically paired with a table format like Apache Iceberg or Delta Lake for transactions and schema management at the table level.

## Working with ORC and DuckDB
DuckDB does not have a native ORC reader — Parquet is its primary supported columnar file format. To bring ORC data into DuckDB, a common approach is to use Apache Arrow (which does support ORC) to read the file into an Arrow table or Parquet file, and then query it from DuckDB:

```python
import pyarrow.orc as orc
import duckdb

table = orc.read_table("data.orc")
duckdb.sql("SELECT * FROM table LIMIT 10").show()
```

Alternatively, converting ORC files to Parquet with Spark or Trino ahead of time makes them directly queryable with `read_parquet()` in DuckDB.