If no project is open, the command Tools > Reorganize database... is available. In the dialog, select any database "*.pro" from a project directory. This will reorganize the internal structure and decrease the database size.