SQLite has no unbounded memory growth, otherwise you would be not the
only one who noticed it. Sometimes cache growth can look like leak but
it has its limit and it is bounded.
So probably you use SQLiteCommand incorrectly, but I can't advise on
this as I never worked with C# library.

Answering your question though: if you never read or write into the
database it isn't cached in any way. If you never execute select
statement but execute insert statements then table will be cached
because while inserting SQLite will have to search where to put new
data. And of course this new data will be cached after insert.


Pavel

On Tue, Apr 27, 2010 at 3:17 PM, Radcon Entec <[email protected]> wrote:
> Pavel,
>
> Thank you for your reply.  Does data get cached even though I am never 
> executing a select statement?
>
> Here's the real world problem:  I am trying to write a service that updates 
> 124 simple SQLite databases every minute.  The service is written in C#, 
> using Visual Studio 2008 and the SQLite ADO.Net Provider 2.0 library from PHX 
> Software.  The databases are identical in structure.  There are six tables, 
> of which five are very small.  Those tables are the only ones that are ever 
> read, and they're only read once, when the service starts up.  The sixth 
> table contains three columns.  It is never read.  Every minute, one row is 
> added to that table.  The service constantly increases its memory 
> consumption.  Because this is a service, unbounded memory growth is not 
> acceptable.  I have commented out the call to the 
> SQLiteCommand.ExecuteNonQuery() method.  In that case, the service's memory 
> footprint is constant.  Therefore, the problem is either in the provider or 
> in SQLite itself.
>
>
> I am sure that SQLite has been used many times in Windows services and other 
> persistent applications.  What is the preferred technique for avoiding this 
> unbounded memory growth?  Do I have to close my databases at the end of my 
> loop and then reopen them at the start of the next loop?
>
> Thanks again to you and to all who are able to advise me.
>
> RobR
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to