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…
Question
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)- A71% (12)
- B6% (1)
- C6% (1)
- D18% (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
Community Discussion
No community discussion yet for this question.