Improving query see BT#7754