Hi, I cannot really put all the inserts into one transaction because in case of a failure I loose all the already inserted data. Though I made some tests. There is hardly any performance gain anymore when doing 1000 or 10 000 insertions in one transaction including immediate insertion into indices (in my case the difference is in the per cent range).
What is the background that index creation is so much faster than insertion using indices? Once I heard something about fragmentation but on solid state disks fragmentation should not play a role as long as indices and data are separated, are they? Regards, Hartwig > Am 2019-09-10 um 17:16 schrieb Richard Hipp <d...@sqlite.org>: > > On 9/10/19, mailing lists <mailingli...@skywind.eu> wrote: > >> So, the best solution I found so far is to disable indexing while insertion >> and to index the table afterwards > > I think that is the best solution. Be sure to also do all of your > inserts (and the CREATE INDEX statements) inside of a transaction. > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users