#1 2026-01-17 00:07:57

bigheart
Member
Registered: 2014-08-01
Posts: 56

What is the best way from csv data to sqlite

Hi all,

Is there anyone to advise the most efficient way that the  fastest code for the inserting to sqlite from csv data.

Have fun mormot

Offline

#2 2026-01-17 08:59:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,383
Website

Re: What is the best way from csv data to sqlite

Some ideas about SQLite itself:
1) Open the DB in exclusive mode
2) Use several transactions
3) Multi-insert as we do for the ORM
4) Create the indexes after the insertion

And for the CSV we have fast CSV parsing in the framework.

You will reach 1,000,000 inserts per second as we do with the ORM.

Offline

Board footer

Powered by FluxBB