Compact database every night