Hi,

Could someone clarify to me how the VACUUM command works if WAL is
enabled?

I would like to compact my database, but I am note sure if I should:

1) Run PRAGMA wal_checkpoint to get all outstanding commits into the
   database file and then VACUUM to compact the database file,

or should I

2) Run VACUUM to create a compact version of the database file (but
   writing into the WAL file) and then run PRAGMA wal_checkpoint to get
   the changes done by VACUUM into the database file itself?

   
The documentation says that "The VACUUM command cleans the main database
by copying its contents to a temporary database file and reloading the
original database file from the copy". But it seems to me that this
might be a remnant from the days of the old journal, since now the WAL
file could be used instead of the temporary database.


   
Thanks,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

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

Reply via email to