You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
hi!
curiosity [that may help me, lol]: is there a way to create a sqlite
database in memory, then save it to disk after initial inserts are
done? let's say I have around 2 gb of data to insert and ... it
takes like forever. i still have not convinced my boss to buy a ssd,
so ... :D
cheers,
richard.
Petr Viktorin
unread,
Jun 17, 2013, 10:18:18 AM6/17/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
You can tell SQLite to disable syncing and journalling, it should get
very fast then:
if session.connection().dialect.name == 'sqlite':
session.connection().execute("PRAGMA synchronous=OFF")
session.connection().execute("PRAGMA journal_mode=OFF")
Of course, your data will be corrupted if the load doesn't exit
cleanly, but for the initial inserts it's not that important -- you
can just delete the DB and start again.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
Hmmm, never knew of that. All my
"constraints" are already predefined and inserts are in order so I
won't get a broken FK. I'll try that too see if it increases the
speed (decreasing my headaches per build, lol).
Thanks a lot, Petr!
Richard Gerd Kuesters
unread,
Jun 17, 2013, 3:29:50 PM6/17/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
Petr, just found something intesting that may work
for anyone:
I was able do create a database totally in memory and them just
"dump" it to a file. The process now takes about 5 minutes,
against one hour+ that it took earlier.