I've added a call to the vacuum command but after I delete all of the
data from the database, the G1's Manage Applications screen still
shows 2MB of data for our app.
Here's a snippet of my code that calls vacuum:
if (!dbInstance.inTransaction()) {
dbInstance.execSQL("vacuum"); // compact the db
TLog.log("SQLRS vacuum db cnt tables dropped " +
Integer.toString(cntDropped));
} else {
TLog.log("SQLRS cannot vacuum db it's in
transaction, cnt tables dropped " + Integer.toString(cntDropped));
}
Is anyone else having problems with this?
Thanks,
Jade
On May 28, 6:13 pm, jade <[email protected]> wrote:
> Marco,
>
> Thanks for the quick reply! Here's the link to the vacuum command in
> case anyone else needs it:http://sqlite.org/lang_vacuum.html
>
> Jade
>
> On May 28, 3:57 pm, Marco Nelissen <[email protected]> wrote:
>
> > IIRC sqlite databases aren't automatically compacted when things are deleted
> > from them. You need to use the 'vacuum' command to do that.
>
> > On Thu, May 28, 2009 at 2:44 PM, jade <[email protected]> wrote:
>
> > > When we delete items from our sqlite database in our Android app, the
> > > size of the data under our application (under the G1's settings ->
> > > Applications -> Manage applications) doesn't change. It changes when
> > > we add data but not when we delete it.
>
> > > We have a debugging mode where we query the sqlite database and from
> > > that data I can tell that the records have been deleted.
>
> > > Is anyone else having this problem? I've also looked at this post:
>
> > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > we only have 18 unlinked records so I don't think this is the problem.
>
> > > Jade
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---