iterating one time through query result during time measurement