Hi ,
I have two questions:
    1) Calucate the actual size of the database(NOT RUN VACUUM) - "Actual 
database size" which won't include the space of deleted rows.
        To be more specific you calculate the database size by the following 
below(WITHOUT VACUUM)
        Database file size - (pragma freelist_count *  pragma page_size )
        this calculation will return the actuall database size(the size exclude 
the space of deleted rows)
    2) No VACUUM the database which has a lot of deletion.
        Is that true that the space of the database won't reclaim if we don't 
run the "VACUUM" on the database.
  Thanks,
JP



----- Original Message ----
From: Ronny Dierckx <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; General Discussion of SQLite Database 
<sqlite-users@sqlite.org>
Sent: Friday, May 30, 2008 12:12:14 AM
Subject: Re: [sqlite] get the actual database size.

Hi,

I think a possible solution is to calculate the difference between
the database file size and the number of free pages multiplied by
the page size. This is of course an approximation, but it works for me.

Number of free pages: pragma freelist_count
Page size: pragma page_size 

Ronny

http://www.syntegro.be


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of P Kishor
Sent: vrijdag 30 mei 2008 2:40
To: General Discussion of SQLite Database
Subject: Re: [sqlite] get the actual database size.

On 5/29/08, Joanne Pham <[EMAIL PROTECTED]> wrote:
> Hi All,
>  I have the database which has a lot of insertion and deletion.
>  Is there anyway that I can get the actual database size without running
VACUUM.

Your question implies that VACUUM lets you "get the database size."
No, it doesn't. VACUUM recovers the space left behind by deleting data
from the db.

To find out the size of the database, just read the size of the file
in the operating system.

Or, maybe you are asking something completely different that I don't get.


>  Thanks,
>  JP
>
>
_______________________________________________
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



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

Reply via email to