Set query result size only once for each instance

Issue: GCP-9771

Reviewer: Darla