Faster QueryFactory