Closed sionking closed 6 years ago
Nothing is stored in memory, sqlite is a disk (file) based database.
A transaction is committed to disk with commit()
, or after each operation if you have autocommit
on.
See the official sqlite docs about the commit semantics (sqlitedict is just a wrapper for sqlite).
But what will happen if I add 10 new keys to the dict, with autocommit off, Will those keys be in-memory? accessing them is like accessing memory not disk ?
Sqlitedict will do whatever Sqlite itself does -- there's no additional transactional logic on top. See the link above, or ask at the Sqlite forum if in doubt.
When I do autocommit on, will it retrieve the data from disk or from memory? If I want to retrieve last 1000 values from memory and the rest from disk, should I commit once in 1000 new values ?
In general what is the memory consumption of the dict in RAM ?