Parquet vs CSV
Parquet is a compressed, columnar binary file format optimized for analytics, while CSV is a plain-text, row-based format with no built-in schema or compression — Parquet is generally faster and smaller for analytical workloads, while CSV is simpler and universally readable.
Overview
CSV (comma-separated values) is a plain-text format that stores data row by row, with no embedded schema — every value is text, and types (integer, date, boolean) must be inferred or specified separately. Parquet is a binary, columnar format that stores values grouped by column, embeds the schema and per-column statistics, and compresses data far more effectively.
Why the difference matters for analytics
Because Parquet groups data by column, a query that only needs a few columns out of many can skip reading the rest of the file entirely — CSV requires scanning every field of every row regardless of which columns a query uses. Parquet also stores min/max statistics per row group, so engines can skip whole chunks of data that can't match a filter. Combined with columnar compression (values in a column tend to be similar, so they compress well), Parquet files are typically a fraction of the size of the equivalent CSV and much faster to query.
Where CSV still wins
CSV's advantages are simplicity and universality: any tool, spreadsheet, or human can open and read it directly, and it requires no special library to write. It's a reasonable choice for small files, one-off exports, or interchange with systems that don't support Parquet.
Comparing them in DuckDB
DuckDB reads and writes both formats natively, and can convert between them directly:
Copy code
-- Inspect a CSV's inferred schema and stats
SUMMARIZE FROM read_csv('sales.csv');
-- Convert CSV to compressed Parquet
COPY (FROM read_csv('sales.csv')) TO 'sales.parquet' (FORMAT parquet, COMPRESSION zstd);
-- Compare file sizes and query speed directly
SELECT COUNT(*) FROM read_parquet('sales.parquet') WHERE region = 'EU';
In practice, teams often use CSV for initial exports or manual inspection and convert to Parquet before running repeated analytical queries.
Related terms
Apache Parquet is a columnar storage file format designed for efficient data processing and analytics.
CSV →CSV (Comma-Separated Values) is a simple, text-based file format used to store tabular data.
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.
Reading files in DuckDB →DuckDB can read CSV, Parquet, JSON, and other file formats directly with SQL table functions, whether the files are local, remote over HTTP/S3, or matched in bulk with a glob pattern.
storage →DuckDB uses an efficient columnar storage format optimized for analytical queries.
Table format →A table format is a metadata layer on top of data files in a lake or object storage that defines what constitutes a table — its schema, partitioning, and file list — enabling ACID transactions, schema evolution, and time travel across multiple query engines.
FAQS
For analytical workloads with repeated queries over large datasets, yes — Parquet is smaller and faster due to columnar storage, compression, and embedded statistics. CSV remains useful for small files, simple interchange, or when human readability matters.
Parquet stores values grouped by column and applies columnar compression, which works well because values within a single column tend to be similar. CSV is uncompressed plain text with no type information, so it takes more bytes to represent the same data.
Use COPY with a SELECT from read_csv(), for example: COPY (FROM read_csv('file.csv')) TO 'file.parquet' (FORMAT parquet). DuckDB infers the CSV's schema automatically.
