by jtigani · 2y ago · 0 comments
You mentioned OOMs, this has been a focus for a while and ha gotten steadily better over the past few releases. 0.9 added spill to disk to prevent most OOMs. And 0.10, released a couple of weeks ago, fixes a bunch more memory usage problems. The storage format, which another commenter brought up, is now fully backwards compatible.
I'd suggest giving it another try, especially once 1.0 comes out.
Example of a query that should never, ever, out-of-memory, but absolutely will in the latest DuckDB:
COPY
(
SELECT
rs.my_int,
rs.my_bigint
FROM
READ_PARQUET('s3://some/folder/my-large-files-*.parquet')
AS rs
)
TO
'/my/home/folder/my-large-file.parquet'
(
FORMAT PARQUET,
ROW_GROUP_SIZE 100000,
COMPRESSION 'ZSTD'
)
;
This query should simply read the two column series selected based on the parquet metadata and then stream the data to the disk.And yet it will try to load data in memory before crashing.
There were some recent fixes: https://github.com/duckdb/duckdb/issues/10737