Improve promise query.