Hello,

I'm on WinXP and using sqlite 3.7.4 with the CLI. I try to insert ~ 10,100,000
records into a schema with different tables (http://pastebin.com/cbsPHNEj). The
db file has already 1.9 GB when I start the INSERTs via

sqlite3 -bail extra.db3 < inserts.sql

The statements in inserts.sql look like

PRAGMA foreign_keys = ON;
-- table01
BEGIN TRANSACTION;
INSERT INTO ....
INSERT INTO ....
...
COMMIT;
-- table02
BEGIN TRANSACTION;
INSERT INTO ....
INSERT INTO ....
...
COMMIT;
....
-- last table
BEGIN TRANSACTION;
INSERT INTO ....
INSERT INTO ....
...
COMMIT;
PRAGMA foreign_keys = OFF;

Most INSERTS are done into the table Verteilerdaten (>10,000,000). I think the
time depends heavily on the activated FOREIGN KEYs - is my assumption correct
and is this a behaviour I only can avoid by not switching this PRAGMA on?

greetings
Oliver

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to