Create indexes during worker bootup. Fix the database selection