Improve db migration so that multiple SELECT can be concurrently executed