On Thu, Mar 16, 2017 at 11:19 PM, Bob Friesenhahn
<bfrie...@simple.dallas.tx.us> wrote:
> On Thu, 16 Mar 2017, Richard Hipp wrote:
>>
>>
>> Your 664K is a conservative estimate.  On my (64-bit linux) desktop,
>> I'm showing 1.58MB of heap space used to store the schema.  (Hint:
>> bring up the database in the command-line shell, load the schema by
>> doing something like ".tables", then type ".stats".  There will be a
>> line that shows you the total amount of heap memory devoted to storing
>> the schema.  I'm showing 1583864 bytes.)
>
>
> We are still using version 3.10.2 and when I type ".stats" I get only
> "Usage: .stats on|off".

Consider upgrading to a more recent version of SQLite.
In release notes at https://sqlite.org/changes.html  I see:

SQLite 3.12.0:
- Reduce the amount of memory needed to hold the schema.

No idea how much this saves though.

Also defining some SQLITE_OMIT_* can save memory when
storing the schema I think.

I also recall that at some point, SQLite introduced memory saving
by not storing constraints in memory for read-only connections.
I don't see which SQLite version introduced this, but make sure
that you open connections as read-only if you can.  In my case,
it was reducing by half the amount of memory used for the schema.

I'm also interested in saving memory in schema by the way.
So +1 if there is any potential improvement left.

Dominique
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to