[SQLite] Is it possible to detect the need to use VACUUM ?

The title says all:

Is it possible to detect - by code - the need to use VACUUM in a SQLite Data Base ?

I haven’t tested that this works in Xojo. Per the SQLite documentation you should be able to determine this based on the page_count and freelist_count PRAGMAs.

but it would be up to you to decide what threshold needs to be passed…

Thanks Michael & Dave.

I will investigate.

Isn’t this why we have AUTOVACUUM?

how to use AUTOVACUUM ??

Check it out here: https://www.sqlite.org/lang_vacuum.html

The file have to be created with AUTOVACUUM on (read the text) before adding any TABLE.

I already read that block of text, but a second reading was good. I may even take a third (or fouth) reading :wink: