Replies: 1 comment
-
@foondadom |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an Android database from which I've removed a bunch of base64 strings. As expected, the db does not decrease in size automatically, but I would like to vacuum the database once the base64 has been removed.
I've tried running the vacuum command (db.exec) on the open database which tells me that vacuum cannot be run while there's a transaction. I've also tried running the command before the db is open which naturally results in a 'no database open' error.
I've also tried running executeSet directly on the SQLitePlugin with the vacuum command, but again the database needs to be open and connected.
const vacuumSet = [ { statement: "VACUUM;", values: [] } ]; await sqlitePlugin.executeSet(vacuumSet);
Questions:
let delUsers = "DELETE FROM users;"; delUsers += "VACUUM;"; ret = await jeepSqlite.execute({database: "testNew", statements: delUsers, transaction: false});
Is there a better way to achieve database optimisation?
Beta Was this translation helpful? Give feedback.
All reactions