I haven't looked at the Sqlite code in detail, but in general it is hard
to return memory so memory usage hits a high water mark. You can decide
if that is the case just by looking at the Sqlite source and
establishing how the memory allocation in your OS and compiler support
package works.
What you don't want is to have memory leaks where areas of memory are
allocated and then lost so that memory usage keeps increasing until a
catastrophic failure occurs.
Vacuum will certainly free deleted space in the database and make its
disk footprint smaller. You would have to look at the source to see if
if it returns cache space used by yuor in memory DB.
Dave Gierok wrote:
But the docs say VACUUM is supposed to free that memory which it doesn't look
like it is doing.
-----Original Message-----
From: John Stanton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 3:41 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] DROP INDEX not freeing up memory
Sqlite is allocating cache memory and reusing it. That is not a bug, it
is a beneficial feature.
Dave Gierok wrote:
Yes, I did try that -- I should have mentioned it. When I create and drop the
index again, the amount of memory that Sqlite takes is effectively the same.
That is, to create the index once costs a lot of memory, and then future
deletions/creations does not change the amount of memory allocated.
-----Original Message-----
From: John Stanton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 1:56 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] DROP INDEX not freeing up memory
Dave Gierok wrote:
(I'm resending this, as I have not seen it posted the first time I sent -
apologies if it gets posted twice)
I am running an in-memory db and am using the functionality where we override
all the OS calls such that we implement our own memory management and file IO.
Therefore, I am able to easily track the amount of memory Sqlite is taking up.
I have noticed that when I call CREATE INDEX and then the corresponding DROP
INDEX, I do not see the memory drop to the same level as it was before the
CREATE INDEX. I also call VACUUM after DROP INDEX, which makes no difference.
Is this expected, or does it sound like a bug in Sqlite?
Thanks,
Dave
What happens if you create and drop the index again? Do that to see if
you are just seeing an effect of assigning cache on the first operation.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------