Guides
Handling Parquet Files
The queries on the [TPC-H benchmark](#docs:extensions:tpch) run approximately 1.1-5.0× slower on Parquet files than on a DuckDB database.  
> **Best practice.  ** If you have the storage space available, and have a join-heavy workload and/or plan to run many queries on the same dataset, load the Parquet files into the database first. The compression algorithm and the row group sizes in the Parquet files have a large effect on performance: study these using the [`parquet_metadata` function](#docs:data:parquet:metadata::parquet-metadata).  
#### The Effect of Row Group Sizes {#docs:guides:performance:file_formats::the-effect-of-row-group-sizes}  
DuckDB works best on Parquet files with row groups of 100K-1M rows each. The reason for this is that DuckDB can only [parallelize over row groups](#docs:guides:performance:how_to_tune_workloads::parallelism-multi-core-processing) – so if a Parquet file has a single giant row group it can only be processed by a single thread. You can use the [`parquet_metadata` function](#docs:data:parquet:metadata::parquet-metadata) to figure out how many row groups a Parquet file has. When writing Parquet files, use the [`row_group_size`](#docs:sql:statements:copy::parquet-options) option.