tursodatabase/libsql

Expose a way to INSERT without parsing SQL?

Opened this issue · 1 comments

kirs commented

I'm looking at inserting 100s of millions of rows into libSQL/SQLite. I've been wondering if one way to optimize that would be to get rid of:

  1. building those huge strings with INSERT ... VALUES
  2. having to parse strings those on libsql side

Ideally, there would be some db.Insert(table, [row1, row2]) API that allows to avoid going through SQL layer.

If using SQLite CLI is an option for you then providing data in CSV file and performing something like this

.import bulk_data.csv your_table

will perform much faster than using SQL.