[Interest] SQLite database: avoid high memory usage?

Alexander Dyagilev alervdvcw at gmail.com
Sun Jan 30 17:49:23 CET 2022


Sorry, I was wrong. It is an issue of our app.

On 1/24/2022 11:40 AM, Alexander Dyagilev wrote:
> Hello,
>
> Let's suppose we have a database file of 16GB in size.
>
> We open it using this code:
>
> m_db = QSqlDatabase::addDatabase(
>              "QSQLITE",
>              dbConnectionName());
> m_db.setConnectOptions("PRAGMA jounal_mode=WAL;");
> m_db.setDatabaseName(m_dbPath);
> m_db.open();
>
> After this, our process will use 16GB of memory (at least, under 
> Windows OS). I.e. the whole database file is loaded into the memory.
>
> Is there a way to avoid this?
>


More information about the Interest mailing list