[Gpephone-devel] problem about sqlite database in english
Florian Boor
florian.boor at kernelconcepts.de
Sun May 13 16:59:07 CEST 2007
Hi,
余民 schrieb:
> There are some problems when we used the sqlite database.
>
> 1 Normally, when a transaction that deletes data from a database is
> committed, the database file remains the same size. But I must to
> reclaim the unused space. In this mode the "vacuum" command can reclaim
> unused space. However the command consumed long time in the embedded
> machine.
Yes this is true, but "taking long time" is relative... It highly depends on the
usecase if this is really a problem and if it is actually necessary.
> The end users can not endure the long time waiting, so, how can I handle
> the problem ?
What is the amount of data you expect to be freed? If you handle typical PIM
data then we expect some tens or worst case hunderts of entries with some
kilobytes of data. For these use cases it not really critical because the vacuum
command won't take longer than a second (which is in fact long for the user
expecting immediate response from the user interface).
In other cases when you expect more data to be removed it would be necessary to
take a more closer look at the actual needs. e.g. If new records are added after
deleting you might just skip the database vacuum step, because the space
occupied by the deleted records is used by the new ones afterwards.
Greetings
Florian
--
The dream of yesterday Florian Boor
is the hope of today Tel: +49 271-771091-14
and the reality of tomorrow. Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904] florian.boor at kernelconcepts.de
1D78 2D4D 6C53 1CA4 5588 D07B A8E7 940C 25B7 9A76
More information about the Gpephone-devel
mailing list