sql_optimize() function is used to optimise an SQL table. This function is called by the
optimiser_base_une_table() function which is periodically called by the cron mechanism. Please refer to the
OPTIMIZE TABLE or
VACUUM commands for the appropriate SQL database manager to understand the details of what is being executed by these commands.
The function accepts 3 parameters:
$tableis the name of the table to be optimised,
Note: SQLite can not optimise one table at a time, but optimises the entire database in one hit. In this case, if the
sql_optimize() function is called multiple times in a row, then the operation will actually only be performed just once for the first call.