A query is known to return 500,000 rows. Which two are recommended to process all 500,000 rows efficiently? (Select two)
Show answerHide answer
Correct answer: B, C Use setPageSize().Use a batch process for large result sets.
Explanation
Answer Option (Which option is correct) B. Use setPageSize().Answer Option (Which option is correct) C. Use a batch process for large result sets.
Explanation:
Process large query results in controlled pages or chunks rather than materializing the entire result at once. A configured page size and a suitable batch-processing design limit the working set. Sorting by entity name does not itself control memory use.
Verification note: The key selects batch processing while Q143 selects chunking for the same large-result scenario. More than two choices may be defensible.
Why the other options are incorrect:
A. Use Google Iterables:
Google Iterables supplies general collection utilities. That label does not set the database result page size. The source selects paging and batch context.
D. Chunk the results into page sets:
Chunking is relevant to bounded processing. Q143 selects it for the same row count. Its exclusion here is not confidently justified.
E. Sort the result by entity name:
Sorting changes result order. It does not limit the number of loaded rows. A memory-bounded processing strategy is still needed.
References:
Guidewire - Query-backed collections and buildBaseQuery
Guidewire Cloud Standards - Sign-in required