Thanks a lot Paul! It worked.
Thanks,
JP

----- Original Message ----
From: Paul Smith <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database <[email protected]>
Sent: Tuesday, April 15, 2008 1:34:14 AM
Subject: Re: [sqlite] delete rows but the database files still have the big size

Joanne Pham wrote:
> Do I miss some commands here? I thought the database file size shoud get much 
> smaller after the delete operation but it isn't.
> Can you please help to let me know how to get the database file szie smaller.
> I have tried "VACUUM" but the file's size didn't change.
>  
VACUUM should do it.

When you delete rows, the file size won't change (this is common with 
most database engines) as that would require a lot of extra work (ie all 
the bits at the end of the file which are still in use will need moving 
into all the gaps which are now unused). VACUUM does that for you, but 
requires exclusive access to the database. DELETE doesn't do it, or it 
would be really time consuming. DELETE just marks the gaps as unused, so 
they can be re-used later.

Did you make sure that nothing else was using the database before you 
ran VACUUM on it?


_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to