in reply to DBI::SQLite slowness
## begin transaction ## foreach loop ## end transaction
see also Re^5: Index a file with pack for fast access/Sauntering Coder: Fastest bulk import into sqlite which says
#~.echo ON .read create_table_without_pk.sql PRAGMA cache_size = 400000; PRAGMA synchronous = OFF; PRAGMA journal_mode = OFF; PRAGMA locking_mode = EXCLUSIVE; PRAGMA count_changes = OFF; PRAGMA temp_store = MEMORY; PRAGMA auto_vacuum = NONE; .separator "\t" .import a_tab_seprated_table.txt mytable BEGIN; .read add_indexes.sql COMMIT; .exit sqlite3 mydb.db < commands.txt
http://www.sqlite.org/pragma.html#pragma_cache_size
http://www.sqlite.org/pragma.html#pragma_synchronous
http://www.sqlite.org/pragma.html#pragma_journal_mode
http://www.sqlite.org/pragma.html#pragma_locking_mode
http://www.sqlite.org/pragma.html#pragma_count_changes
http://www.sqlite.org/pragma.html#pragma_temp_store
http://www.sqlite.org/pragma.html#pragma_auto_vacuum
Command Line Shell For SQLite
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: DBI::SQLite slowness (DBD::SQLite bulk insert woes)
by Anonymous Monk on Sep 20, 2013 at 02:45 UTC | |
by marinersk (Priest) on Sep 20, 2013 at 20:31 UTC |