Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get SQLite 'VACUUM' Progress

Is there a way to get the progress of sqlite 'VACUUM'?I am using this line of code here in Java:

connection1.createStatement().executeUpdate("VACUUM");

The User(MySelf & I) has to wait from some seconds to some minutes,i know that the actual .db file is being overriten with the help of a journal file that is created through the execution of the command.

Can i get an estimation using JAVA IO or something?Thanks for help..

like image 547
GOXR3PLUS Avatar asked Dec 20 '25 22:12

GOXR3PLUS


1 Answers

No. The SQLite C API has a progress handler, but it's probably not exposed by your Java driver, and the vacuum processing is implemented with a different mechanism that does not report the progress anyway.

You could try to look at the current size of the database file and of any temporary files, but it is practically impossible to get the name of the latter.

like image 102
CL. Avatar answered Dec 23 '25 12:12

CL.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!