There was a possibility that the .lock.db file was not deleted when the database was closed, which could slow down opening the database.