Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Feb 2013, at 6:34pm, Paul Sanderson <sandersonforens...@gmail.com> wrote: > >> I want to populate a large table (millions of rows) as quickly as possible, >> >> The data set will not be operated on until the table is fully populated and >> if the operation fails I will be starting again. the operation is a one off >> and the table will not be added to at a future date. >> >> What are optimisations will work best for me? > > Don't worry about hacking into SQLite. You should initially try it doing > something like > > DROP all your indexes > DELETE FROM myTable > BEGIN > INSERT ... > INSERT ... > INSERT ... > ... > END > CREATE whatever indexes you want > > If that proves not to be fast enough for you, you can mess > with making a new transaction every 100,000 rows or > something: just do "END; BEGIN" every so-often. > If it's still not fast enough you can mess with > 'PRAGMA journal_mode = OFF'.
In addition to all this, you can also try: PRAGMA synchronous=off But read about the risks: http://www.sqlite.org/pragma.html#pragma_synchronous Dominique _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users