Optimize database blocked.