On Fri, 27 May 2016 at 00:16 Eric Grange <zar...@gmail.com> wrote:

> Hi,
>
> I am looking for the fastest way to insert many rows to a simple table.
>
> By "simple" I mean a relation table (with just a couple integer/key fields)
> or even a single-column (temp table used for filtering as an alternative to
> a "in" literal), but I want to insert hundreds of thousandths of them as
> fast as possible.
>
> The fastest I have found so far is to use an insert from a select with
> json_each() used to provide the data.
> Using multiple "insert into", even within a prepared statement within a
> transaction is quite slower.
>
> The json_each approach would satisfy my need, but I am curious is there is
> another approach that could be suggested? (without involving a custom
> function)
>
> Eric
>

http://stackoverflow.com/questions/1711631/improve-insert-per-second-performance-of-sqlite
has
a useful comparison of various techniques.  I used its comparison when
developing our product using SQLite with large numbers of records getting
inserted.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to