How to vacuum a SQLite database via SQLDB? lazarus / 16-Databases ---------------------------------------------------------------------- kpeters58 · 2018-01-16 23:02 How can I vacuum a SQLite database and receive the results of that operation via SQLDB? Thanks in advance for all pointers! ---------------------------------------------------------------------- taazz · 2018-01-17 00:49 http://forum.lazarus.freepascal.org/index.php?topic=11776.0 ---------------------------------------------------------------------- kpeters58 · 2018-01-17 16:46 Not quite - I knew how to run vacuum already - I am interested in also receiving a result of that operation. Just snooped around at the SQLite site and I may have to live without such results - as you can see below it seems to be a void function /* ** The non-standard VACUUM command is used to clean up the database, ** collapse free space, etc.  It is modelled after the VACUUM command ** in PostgreSQL. ** ** In version 1.0.x of SQLite, the VACUUM command would call ** gdbm_reorganize() on all the database tables.  But beginning ** with 2.0.0, SQLite no longer uses GDBM so this command has ** become a no-op. */ void sqlite3Vacuum(Parse *pParse){   Vdbe *v = sqlite3GetVdbe(pParse);   if( v ){     sqlite3VdbeAddOp2(v, OP_Vacuum, 0, 0);   }   return; } ---------------------------------------------------------------------- taazz · 2018-01-17 18:34 Quote from: kpeters58 on January 17, 2018, 05:46:23 pmNot quite - I knew how to run vacuum already - I am interested in also receiving a result of that operation.you can run PRAGMA page_count; PRAGMA page_size; before and after the vacuum to show the changes if any or find some other pragma that returns some stats. If everything else fails there is the PRAGMA stats, which is not to be used outside of testing/developing environment and therefore not recommended to be used in any end user application, but if you only show the information as before and after vacuum that might not be that problematic.