On 5/17/16, Markus Ecker <markus.ecker at omicronenergy.com> wrote:
> Hello together!
>
> I am struggling with a memory issue of SQLite and therefore searching for
> help. The database of our product has about 70GB of data. When I call the
> "PRAGMA integrity_check" method, the memory consumption of my system
> continuously increases until all of my 16GB of RAM are used.
> The interesting thing is that the memory is not consumed by the processes
> working on the SQLite itself.  Rather it seems that the database file is
> mapped into memory as you can see from the output of RamMap.

If the memory consumption is outside of SQLite, that seem like it is a
problem outside of SQLite, no?

I ran a "PRAGMA quick_check" on your database on Linux and it ran
fine, using very little memory.

When you run "PRAGMA integrity_check", SQLite does have to read every
page of the database file - all 51,929,418 of them.  Perhaps the disk
cache system on your test platform causes that to use a lot of memory.
You might try changing the page size from 1024 to 4096.  I don't think
that will fix your current problem, but it might make things go faster
in general.

-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to