I think I know what's going on. 

When you insert new rows in the presence of indexes then sqlite must
touch a lot of pages in each trascation to satisfy the rebuilding of
the index(es). These pages are built up in the transaction log which is 
stored in temp_store, which happens to be memory in your case.
SQLite's transaction log cannot be disabled.

If you drop the indexes, then your inserts will touch fewer pages resulting
in a smaller transaction log, and less temp_store use. But this is not
really a solution. To avoid this problem, you cannot use memory for 
temp_store.

--- Kalyani Tummala <[EMAIL PROTECTED]> wrote:
> I am planning to use sqlite as a database for storing and retrieving
> media data of about 5-10k records in a device whose main memory is
> extremely small. A sequence of insert statements increasing the heap
> usage to nearly 70K(almost saturating point) which is crashing my
> application. I want to restrict this to 30K. 
> 
> I tried closing database and reopen after some inserts but of no use. 
> 
> I have observed that, when I open the database with about 1K to 2K
> records in it, inserts and updates take more heap and also gradually
> increase than a a database with less than 1k records in it. 
> 
> My objective is to reduce the peak heap usage during inserts, updates
> and also deletes with little or no performance degradation.



       
____________________________________________________________________________________Sick
 sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to