alamb commented on code in PR #67: URL: https://github.com/apache/datafusion-site/pull/67#discussion_r2029838372
########## content/blog/2025-04-10-fastest-tpch-generator.md: ########## @@ -0,0 +1,614 @@ +--- +layout: post +title: tpchgen-rs World’s fastest open source TPC-H data generator, written in Rust +date: 2025-04-10 +author: Andrew Lamb, Achraf B, and Sean Smith +categories: [performance] +--- + +<!-- +{% comment %} +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to you under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +{% endcomment %} +--> + +<style> +/* Table borders */ +table, th, td { + border: 1px solid black; + border-collapse: collapse; +} +th, td { + padding: 3px; +} +</style> + +3 members of the [Apache DataFusion] community used Rust and open source +development to build [tpchgen-rs], a fully open TPC-H data generator over 10x +faster than any other implementation we know of. + +It is now possible to create the TPC-H SF=100 dataset in 72.23 seconds (1.4 GB/s +😎) on a Macbook Air M3 with 16GB of memory, compared to the classic `dbgen` +which takes 30 minutes<sup>1</sup> (0.05GB/sec). On the same machine, it takes less than +2 minutes to create all 3.6 GB of SF=100 in [Apache Parquet] format. Review Comment: @clflushopt, When reading this introduction I think it would also be nice to report the time taken to create Scale Factor 100 using DuckDB (my laptop has more memory and I think the numbers with more modest specs are more compelling) Is there any chance you can time how long it takes to run this script on your machine? ```sql INSTALL tpch; LOAD tpch; .open test .timer on CALL dbgen(sf = 100); -- Export each table to Parquet format copy customer to 'customer.parquet' (FORMAT parquet); copy lineitem to 'lineitem.parquet' (FORMAT parquet); copy nation to 'supplier.parquet' (FORMAT parquet); copy orders to 'supplier.parquet' (FORMAT parquet); copy part to 'part.parquet' (FORMAT parquet); copy partsupp to 'partsupp.parquet' (FORMAT parquet); copy region to 'region.parquet' (FORMAT parquet); copy supplier to 'supplier.parquet' (FORMAT parquet); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org