mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
Fixes #2087 But it's assumingly because there's no way to be sure since there's nothing in the ticket to reproduce. Speeds up CSV import 2x on average by preparing the insert statement once instead of doing it per batch. Inspired by SQLite, that's how it currently goes about it. Ran it against some ClickBench and TPC-H datasets and here's the numbers: - TPC-H orders.csv, 1.5m rows / 9 cols: from 5.17s down to 2.46s - TPC-H lineitem.csv, 6m rows / 16 cols: 47.8s to 29.7s - ClickBench hits.csv, 1m rows / 105 cols: 43.8s to 18.6s There is possible way to make it even faster making it vectorized like Postgres COPY doing, but I didn't take this route since it looks too invasive. Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #8470