Didn't you ask this question 4 days ago, and it was answered? The only
difference in your question this time around seems to be that you are
asking for a way to reduce the db file size. You could utilize a
compression library on your data... check the mail archives and also
google for that information.

On Mon, Feb 16, 2009 at 10:02 PM, jaya_kumar
<jayakumar.ananthakrish...@wipro.com> wrote:
>
> Hi All,
>
> In the following use case, when I try to update the following number of
> objects SQLite DB file size is very large
>
> 1. 1k object - DB file size was 264 Kb
> 2. 41k object - DB file size was 11 Mb
> 3. 100k object - DB file size was 26 Mb
>
> Is there any way to reduce the DB file size?
>
> Thanks in advance,
> Jai
>
>
>
> Kees Nuyt wrote:
>>
>> On Thu, 12 Feb 2009 19:14:44 -0800 (PST), jaya_kumar
>> <jayakumar.ananthakrish...@wipro.com> wrote in General
>> Discussion of SQLite Database <sqlite-users@sqlite.org>:
>>
>>>
>>>I am trying to find the peak heap usage for creating a table with few
> entries
>>>and when calculated the peak heap usage increases as the numbers of items
>>>inserted into the table increases.
>>>
>>>Following are the steps done,
>>>1. Table created
>>>2. Table updated by insert statement
>>>3. Query for a single tupple from the table based on a primary key
>>>
>>>Please find below the heap usage when sqlite was operated in file mode,
>>>1k entries - 315 Kb
>>>10k entries - 2.3 Mb
>>>100k entries- 5.7 Mb
>>>
>>>Please find below the heap usage when sqlite was operated in memory mode
>>>(using ":memory:"),
>>>1k entries - 318 Kb
>>>10k entries - 11.6 Mb
>>>100k entries- 29.6 Mb
>>>
>>>I am newbie to SQLite, so please let me know if these figures are expected
>>>for SQLite.
>>
>> In general, yes, they are expected.
>>
>>>Also please let me know why is the heap usage increasing based
>>>on the total number of entries updated to the database?
>>
>> For the file database you see the cache growing.
>> There is a maximum on the cache size, which can be
>> influenced by
>>
>>       PRAGMA page_size;
>>       PRAGMA default_cache_size;
>>       PRAGMA cache_size;
>>
>> Every page in cache has some administrative overhead, so the
>> memory occupied will be more than just
>>       page_size * cache_size.
>>
>> For the :memory: database, you see the rows being stored in
>> memory and perhaps also some cache.
>>
>> Obviously, both cases also use some memory to store the
>> datastructure that stores the interpreted schema and
>> housekeeping stuff.
>>
>>>Thanks in advance,
>>>Jai
>>
>> More detail can be found on the site (architecture etc.) and
>> in the (well-documented) source.
>> --
>>   (  Kees Nuyt
>>   )
>> c[_]
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to