SQLite vacuum statement lazarus / 16-Databases ---------------------------------------------------------------------- JanRoza · 2010-07-04 22:14 On the SQLite website I read that you can use the vacuum statement on a SQLite database. Can anyone give me an example of how to do this? In my application I have only TSQLite3Datatsets, so how to perform an Vacuum statement on a whole database? I know there is the auto-vacuum option but I did not knew that when the database was created and it can only be set at creation time, so that's why I want to use the vacuum statement. Unfortunately i have been unable to find an example. Any help is welcome. Jan ---------------------------------------------------------------------- LuizAmérico · 2010-07-05 00:38 Dataset.ExecSQL('VACUUM'); ---------------------------------------------------------------------- JanRoza · 2010-07-05 08:52 Thanks Luiz. As a dataset is connected to just one table in the SQLite database, does this mean you can perform this on any dataset and the result will be the whole SQLite database that has been vacuumed? ---------------------------------------------------------------------- JanRoza · 2010-07-06 21:43 Problem solved! dataset.execsql('VACUUM') indeed compacts not just that dataset but the whole database. It's easy, once you know it. Jan