View Single Post
Old 04-16-2011, 06:11 AM   #37
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by Mackx View Post
I do not like the unpredictable duration of vacuum, how long does it take to vacuum a multi MB database file? So (at this moment) I am not in favour of doing it automatically.
Maybe some code in a Database-Settings-dialog that would be able to check the state of global.db and propose a vacuum to the user. An alternative would be to have such a functionality integrated in ctb.
On the other hand, we do not know which problem a vacuum would solve... does it improve performance or does it only cleanup some diskspace?
Another solution could be to perform the vaccum after the indexing, that would add no more than 2-3 seconds to the process, but as the user is already waiting it wouldn't be a problem.

When deleting rows in a sqlite db, it creates void room inside the db. Vacuum-ing basically compacts the file, making (sometimes) the file smaller and improving the performance (a bit).

Anyway, for a typical DR use, there is not much books deletion so vacuum is usually not needed. As much, once each 3 months if you change your contents often.

Iņigo
Iņigo is offline   Reply With Quote