excessive time spent in SqlJetFile.sync on large data insertion
32 views
Skip to first unread message
Andrew Andkjar
unread,
May 19, 2014, 7:28:28 PM5/19/14
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 sql...@googlegroups.com
I'm inserting many (on the order of 10s of millions) of 4 dimensional 64 bit signed integer (Java long) rows and it's taking much longer (hours vs minutes) than I am familiar with the sqlite3 C implementation. I ran Visual VM's sampler on the process and see a large amount of time is spent in SqlJetFile.sync. All my insertions are within a single write transaction. The use case is a single writer writing on the order of 1 gigabyte of this same kind of data in bulk, and I am wondering if I have missed some configuration setting or usage pattern that would reduce the syncing to something that uses all buffers involved more fully. Avoidance of corruption (e.g. on power failure) is lower priority than writing in a more timely manner. Buffering into RAM is acceptable if that will allow eventual fast contiguous disk write. Failing all of this I will simply adopt a more direct storage strategy, however I'd like to avoid that figuring this is something that can be overcome w/o too much work.