nerdexam
Google

PROFESSIONAL-CLOUD-ARCHITECT · Question #123

You are creating an App Engine application that uses Cloud Datastore as its persistence layer. You need to retrieve several root entities for which you have the identifiers. You want to minimize the…

The correct answer is A. Create the Key object for each Entity and run a batch get operation. Create the Key object for each Entity and run a batch get operation https://cloud.google.com/datastore/docs/best-practices Use batch operations for your reads, writes, and deletes instead of single operations. Batch operations are more efficient because they perform multiple…

Submitted by marco_it· Mar 30, 2026Optimizing technical and business processes

Question

You are creating an App Engine application that uses Cloud Datastore as its persistence layer. You need to retrieve several root entities for which you have the identifiers. You want to minimize the overhead in operations performed by Cloud Datastore. What should you do?

Options

  • ACreate the Key object for each Entity and run a batch get operation
  • BCreate the Key object for each Entity and run multiple get operations, one operation for each
  • CUse the identifiers to create a query filter and run a batch query operation
  • DUse the identifiers to create a query filter and run multiple query operations, one operation for

How the community answered

(17 responses)
  • A
    71% (12)
  • B
    6% (1)
  • C
    6% (1)
  • D
    18% (3)

Explanation

Create the Key object for each Entity and run a batch get operation https://cloud.google.com/datastore/docs/best-practices Use batch operations for your reads, writes, and deletes instead of single operations. Batch operations are more efficient because they perform multiple operations with the same overhead as a single operation. Firestore in Datastore mode supports batch versions of the operations which allow it to operate on multiple objects in a single Datastore mode call. Such batch calls are faster than making separate calls for each individual entity because they incur the overhead for only one service call. If multiple entity groups are involved, the work for all the groups is performed in parallel on the server side.

Topics

#Cloud Datastore#batch get#entity keys#performance optimization

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-ARCHITECT Practice