On Tue, Feb 7, 2012 at 4:09 PM, Orit Alul <orit.a...@mediamind.com> wrote:

> Hi,
>
> I'm using freelist_count pragma to test whether my sqlite db needs
> vacuuming.
> I'm running intensive inserts and deletes to the DB very often.
> I run the freelist_count pragma periodically and I get different values
> every time - sometimes I get large number and sometimes I get 0 or 1.
> Does this makes sense? How can it be explained?
>

When you delete things, that frees up space in the database file.  The
freed space is added to the freelist.  So between iteration 1 and iteration
2 below, you must have had a net deletion of 40011 pages worth of data.



>
> For example:
> Iteration 1:
> Page_count:     17234731
> Freelist_count:      1
>
> Iteration 2:
> Page_count:     17498568
> Freelist_count:      40012
>
> Please advise,
> Thanks,
> Orit
>
>
>
> [Creative Zone by MediaMind]<http://feeds.mediamind.com/CreativeZone>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to