optimize database init commands