UnQLite Users Forum

What is the maximum size of a database file?

append delete kim

What is the maximum size of a database file?

Can a database reache the maximum file size of the underlying filesystem?

Thanks a lot.

Reply RSS

Replies

append delete #1. chm

That depend on the underlying Key/Value Storage engine but most mostly works with unsigned 64-bit integer so the maximum file size should be 2^63.

append delete #2. Edin M

I start to get insertion Out of memory error for filesize approx 1,513,160,704 bytes ona 32-bit compiled (mingw32). Is this because it is 32bit compiler or is it some other thing, since it is way less then 2^63.

My gist: https://gist.github.com/edin-m/33c81064b3974703b938

append delete #3. chm

Hi,

For very large insertions, you need to commit your work manually via unqlite_commit()[1] say each 200000 insertions or so in order to free some memory. otherwise you'll run out of memory as expected.

[1]: http://unqlite.org/c_api/unqlite_commit.html

append delete #4. Edin M

I moved commit code block but still same.

https://gist.github.com/edin-m/33c81064b3974703b938

append delete #5. flanhard

Make sure the commit block execute if((j % 200000) == 0){ }. Remove the old database file and let unqlite create new.

append delete #6. Edin M

Still same (updated gist).

:: @Edin M added on 18 Sep ’15 · 17:27

(Windows 7 64-bit; NTFS; mingw 32-bit compiler)

append delete #7. chm

I'll reproduce this on my 64-bit testing machine using MSVC once on the office. Thanks for the report.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: chm_at_symisc, devel_at_symisc