professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A data engineering team maintains a reporting dashboard that visualizes transactional records from Firestore in Datastore mode. Users report severe latency degradation when navigating to deeper pages in the data grid. An audit reveals that the underlying application issues queries that retrieve all 50 entity properties while using integer OFFSET and LIMIT clauses for pagination.
Which combination of data modeling and query design changes should you implement to resolve the latency issues and reduce operational read costs?
This solution combines query cursors with projection queries in Firestore in Datastore mode to eliminate internal read amplification and reduce payload overhead.
OFFSET clauses force the database engine to fetch and evaluate all skipped entities internally before discarding them, leading to linear $O(N)$ latency growth on deeper pages. Query cursors act as bookmark tokens indicating the exact index position where the next page begins, executing in $O(1)$ constant time regardless of page depth.OFFSET, your application is billed for reading every skipped entity. Cursors ensure you are only billed for the specific entities returned on the active page.Using cursors alongside projection queries directly targets the two primary architectural bottlenecks: unindexed pagination scanning and over-fetching of unneeded entity properties.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.