Skip to content

Commit 1f9e613

Browse files
committed
move analyze/vacuum after inactive device purge
1 parent 8b3483f commit 1f9e613

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/app/attestation/server/Maintenance.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ public void run() {
3939
try {
4040
samplesConn.exec("VACUUM");
4141

42-
attestationConn.exec("ANALYZE");
43-
attestationConn.exec("VACUUM");
44-
4542
final long now = System.currentTimeMillis();
4643

4744
deleteDeletedDevices.bind(1, now - DELETE_EXPIRY_MS);
@@ -54,6 +51,8 @@ public void run() {
5451
logger.info("cleared " + attestationConn.getChanges() + " inactive devices");
5552
}
5653

54+
attestationConn.exec("ANALYZE");
55+
attestationConn.exec("VACUUM");
5756
} catch (final SQLiteException e) {
5857
logger.log(Level.WARNING, "database error", e);
5958
} finally {

0 commit comments

Comments
 (0)