Courseiva

Google Professional Cloud Database Engineer (PCDE) — Questions 10511125

1446 questions total · 20pages · All types, answers revealed

Page 14

Page 15 of 20

Page 16
1051
MCQmedium

Refer to the exhibit. Which BigQuery SQL query correctly flattens the items into rows?

A.SELECT * FROM orders WHERE items IS NOT NULL
B.SELECT * FROM orders, UNNEST(items) AS items
C.SELECT * FROM orders INNER JOIN items ON true
D.SELECT * FROM orders CROSS JOIN UNNEST(items) AS items
AnswerD

This is correct because CROSS JOIN UNNEST expands the items array into separate rows, preserving other order columns.

Why this answer

`CROSS JOIN UNNEST(items)` is the standard BigQuery syntax to flatten a repeated (array) column into individual rows. The `UNNEST` operator expands each array element into a separate row, and `CROSS JOIN` ensures that all non-array columns from the `orders` table are preserved alongside each element. This is the only option that correctly transforms the nested `items` array into a normalized row-per-item structure.

Exam trap

The Google Cloud Professional Data Engineer exam often tests the requirement that `UNNEST` must be paired with a join (like `CROSS JOIN` or `LEFT JOIN`) and that using `UNNEST` alone or with a `WHERE` clause is syntactically invalid in BigQuery, leading candidates to mistakenly choose Option B.

How to eliminate wrong answers

Option A is wrong because `WHERE items IS NOT NULL` only filters out rows where the entire `items` array is NULL, but does not flatten the array into individual rows; the result still contains arrays. Option B is wrong because `UNNEST(items) AS items` without a `CROSS JOIN` or `LEFT JOIN` is syntactically invalid in BigQuery; `UNNEST` must be used with a join operator (typically `CROSS JOIN` or `LEFT JOIN`). Option C is wrong because `INNER JOIN items ON true` assumes `items` is a separate table, but in this context `items` is a nested array column within the `orders` table, not a standalone table; this would cause a table-not-found error.

1052
MCQmedium

A company uses Cloud Deploy with a delivery pipeline that has dev, staging, and prod targets. They want to require manual approval before promoting a release to prod. How should they configure this?

A.Add an approval gate in the prod target configuration
B.Configure a postDeploy hook that requires approval
C.Use Cloud Build triggers with manual invocation for prod deployments
D.Set the prod target's deployment strategy to 'BlueGreen'
AnswerA

Cloud Deploy supports approval gates on targets; manual approval is required before promotion.

1053
MCQeasy

A company needs to store petabytes of time-series IoT sensor data and query it with single-digit millisecond latency at millions of reads per second. The data has a simple key-value structure with timestamps. Which Google Cloud database is MOST appropriate?

A.Cloud Spanner
B.BigQuery
C.Firestore
D.Cloud Bigtable
AnswerD

Bigtable is the correct choice: wide-column NoSQL, designed for time-series and IoT workloads, single-digit ms latency, and scales to millions of QPS with additional nodes.

Why this answer

Cloud Bigtable is designed for petabyte-scale, low-latency (single-digit ms), high-throughput NoSQL storage for time-series, IoT, and financial data. It scales horizontally by adding nodes. BigQuery is optimised for analytics (seconds-to-minutes latency), Cloud SQL is for OLTP (limited to tens of thousands of QPS), and Firestore is for document data with hierarchical structure.

1054
Multi-Selecthard

You are planning capacity for a Cloud Spanner instance. Which TWO factors directly affect the number of nodes required?

Select 2 answers
A.Number of users
B.Read throughput in queries per second (QPS)
C.Number of indexes
D.Write throughput in queries per second (QPS)
E.Storage size in GB
AnswersB, D

Read QPS directly determines CPU and node requirements.

Why this answer

Cloud Spanner node capacity is primarily determined by compute and I/O requirements, which are directly driven by read and write throughput (QPS). Each node provides a fixed amount of processing power and throughput; therefore, to handle a given QPS, you must provision enough nodes to meet the peak read and write demand. Storage size (Option E) is not a direct factor because Spanner automatically uses available node resources for storage, and you can add nodes for throughput without exceeding storage limits.

Exam trap

The trap here is that candidates often assume storage size is a primary driver for node count, but Spanner decouples throughput and storage, so you must focus on QPS requirements first, especially in exam scenarios where throughput is the bottleneck.

1055
MCQmedium

You are designing a Cloud Bigtable schema for a time-series application where the most common write pattern is high-throughput writes (10,000 writes per second) and the row key starts with a timestamp. Write throughput is lower than expected. What is the most likely cause?

A.The column family has too many columns
B.The row key is too long
C.The cluster has insufficient nodes
D.The row key uses a timestamp as the leading component, causing a hotspot
AnswerD

Monotonically increasing row keys create hotspots.

Why this answer

Using a timestamp as the first part of the row key causes all writes to hit a single tablet (hotspot), leading to poor write throughput. The recommendation is to salt the timestamp with a hash prefix.

1056
MCQeasy

A BI team wants to create a report that shows daily active users for the last 7 days. Which SQL construct is most appropriate for fast performance on a large dataset?

A.SELECT COUNT(DISTINCT user_id) ... WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
B.SELECT DISTINCT user_id ...
C.SELECT COUNT(user_id) ... GROUP BY user_id
D.SELECT APPROX_COUNT_DISTINCT(user_id) ... WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
AnswerD

Approximate distinct is fast and sufficient for trend analysis.

Why this answer

APPROX_COUNT_DISTINCT uses HyperLogLog (HLL) algorithm, which provides near-exact distinct counts with significantly less memory and faster performance than COUNT(DISTINCT) on large datasets. This is ideal for a daily active users report over 7 days where exact precision is not critical.

Exam trap

Google Cloud often tests the misconception that COUNT(DISTINCT) is always the correct choice for distinct counts, ignoring the performance implications on large datasets where approximate counting functions are the appropriate BI solution.

How to eliminate wrong answers

Option A is wrong because COUNT(DISTINCT user_id) requires sorting or hashing all unique user_id values, which becomes extremely slow and memory-intensive on large datasets. Option B is wrong because SELECT DISTINCT user_id returns all individual user IDs without counting them, failing to produce the required daily active user count. Option C is wrong because COUNT(user_id) counts all rows including duplicates, not distinct users, and GROUP BY user_id would produce per-user counts rather than a single daily total.

1057
Multi-Selectmedium

An SRE team is defining SLIs for a data pipeline that ingests events from a pub/sub topic and writes to BigQuery. Which two metrics are good SLIs for pipeline freshness? (Choose TWO.)

Select 2 answers
A.CPU utilization of Dataflow workers
B.Age of the oldest unprocessed message in the subscription
C.Number of events published per second
D.Total number of rows in BigQuery
E.Latency between event ingestion and availability in BigQuery
AnswersB, E

Indicates backlog staleness.

Why this answer

Pipeline freshness measures how up-to-date the data is. Latency of most recent event from ingestion to table and age of oldest unprocessed message are direct measures.

1058
MCQmedium

A company runs an e-commerce website on Cloud SQL. They want to scale read traffic without impacting write performance and need high availability across zones. Which configuration should they use?

A.Create a cross-region replica and use it for reads
B.Increase the machine tier of the existing instance
C.Migrate to Cloud Spanner for automatic read scaling
D.Use a regional Cloud SQL instance with automatic failover and add read replicas
AnswerD

Regional instance provides HA; read replicas scale reads without affecting primary write performance.

Why this answer

Cloud SQL offers read replicas for scaling read traffic and regional (multi-zone) instances for high availability. Using a regional instance with automatic failover provides HA; adding read replicas offloads reads. A cross-region replica adds latency, and a single zone with increased tier does not provide HA.

1059
Multi-Selecteasy

A startup is building an IoT analytics platform that ingests sensor data at high velocity and needs to run real-time dashboards and ad-hoc queries on the data. Which TWO Google Cloud databases should they use together? (Choose 2)

Select 2 answers
A.Cloud Bigtable
B.Cloud Spanner
C.BigQuery
D.Firestore
E.Cloud SQL
AnswersA, C

Handles high write throughput and low-latency reads.

Why this answer

Bigtable is ideal for real-time ingestion and retrieval of sensor data with low latency. BigQuery is used for analytical queries and dashboards. Cloud SQL and Spanner are not optimized for high-velocity IoT ingestion.

Firestore is more suited for mobile apps.

1060
Multi-Selecthard

An engineer is configuring an alerting policy for a latency metric. They want to reduce noise by requiring that the condition be met for at least 3 out of the last 5 alignment periods. Which settings must be adjusted? (Choose 3)

Select 3 answers
A.Alignment period
B.Duration
C.Number of violation periods
D.Evaluation frequency
E.Condition threshold
AnswersA, C, D

The alignment period defines the window for each data point.

1061
MCQhard

During a cutover from an on-premises Oracle database to Cloud SQL for PostgreSQL, the team needs to minimize downtime. They have set up continuous replication using a custom tool. Which sequence of steps should they follow to perform the cutover with minimal data loss?

A.Quiesce writes, promote destination, verify lag, update connection strings.
B.Quiesce writes, verify lag is 0, promote destination, update connection strings, verify application.
C.Promote destination, quiesce writes, verify lag, update connection strings, verify application.
D.Update connection strings, quiesce writes, verify lag, promote destination.
AnswerB

Correct order: stop writes, ensure all changes replicated, then promote and switch.

Why this answer

The correct sequence: quiesce writes to source (stop application writes), verify replication lag is zero (all changes replicated), promote destination (make it writable), update connection strings, then verify the application. Rolling back involves keeping source read-only.

1062
MCQmedium

An application uses Firestore in Native mode. The query filters on two fields: 'status' (string) and 'created_date' (timestamp). The query returns results but the billing shows high document reads. What is the most likely cause?

A.The query is using an inequality filter on 'created_date' which requires a composite index.
B.The query is using 'array-contains' which always scans the entire collection.
C.The 'status' field is not indexed because single-field indexes are not automatic.
D.The query is missing an ORDER BY clause causing a full scan.
AnswerA

Correct. Queries with equality on one field and inequality on another need a composite index to avoid scanning all documents.

Why this answer

In Firestore Native mode, queries that apply an inequality filter (e.g., >=, >, <, !=) on a field automatically require a composite index on both the equality filter field and the inequality filter field to avoid a full collection scan. Without that composite index, Firestore performs a back-end scan of all documents matching the equality filter, then applies the inequality filter in memory, resulting in high document reads. Option A correctly identifies that the inequality filter on 'created_date' is the most likely cause of the excessive reads because it forces Firestore to read and discard many documents that do not satisfy the timestamp condition.

Exam trap

A common pitfall is the misconception that missing ORDER BY or using array-contains causes high reads, when in fact the real culprit is the lack of a composite index for inequality filters combined with equality filters.

How to eliminate wrong answers

Option B is wrong because 'array-contains' does not always scan the entire collection; it can use an automatically created single-field index on the array field, and while it may read more documents than a simple equality filter, it does not inherently cause a full collection scan. Option C is wrong because single-field indexes are automatically created for all fields in Firestore Native mode by default, so 'status' is indexed without manual action. Option D is wrong because missing an ORDER BY clause does not cause a full scan; Firestore can still use indexes to satisfy the filter conditions, and ORDER BY only affects the ordering of results, not the number of documents read.

1063
Multi-Selecteasy

A developer needs to deploy a containerized application to Cloud Run using the gcloud command. Which two flags are required to successfully deploy?

Select 2 answers
A.--region
B.--max-instances
C.--image
D.--concurrency
E.--ingress
AnswersA, C

Required to specify the region where the service will be deployed.

Why this answer

The gcloud run deploy command requires --image to specify the container image and --region to specify the region. Other flags like --ingress and --max-instances are optional.

1064
Multi-Selectmedium

A BI team is troubleshooting a slow BigQuery query. Which TWO actions can help identify the bottleneck?

Select 2 answers
A.Review the query execution plan in the BigQuery UI.
B.Increase the number of slots to maximum.
C.Remove all WHERE clauses to simplify.
D.Rewrite the query to use only CTEs.
E.Check the bytes processed and shuffle bytes.
AnswersA, E

Execution plan reveals stages, timing, and data shuffling.

Why this answer

Reviewing the query execution plan in the BigQuery UI (Option A) is correct because it provides a visual breakdown of query stages, including shuffle operations, data distribution, and stage-level timing. This allows the BI team to pinpoint which stage is consuming the most time or resources, such as a skewed join or a slow aggregation, directly identifying the bottleneck.

Exam trap

Google Cloud often tests the misconception that adding more resources (slots) or simplifying the query (removing WHERE clauses) is a diagnostic step, when in fact these actions change the query's behavior rather than identifying the existing bottleneck.

1065
Multi-Selectmedium

A Database Engineer is deploying a Cloud SQL for PostgreSQL instance for a financial services application that requires high availability and automatic failover. The engineer also needs to ensure that backups are taken daily and retained for 30 days. Which TWO actions should the engineer take? (Choose two.)

Select 2 answers
A.Create a cross-region replica and configure automatic failover.
B.Enable automated backups and set backup retention to 30 days.
C.Enable high availability (HA) configuration on the instance with a regional persistent disk.
D.Schedule a Cloud Scheduler job to export the database to Cloud Storage daily.
E.Enable point-in-time recovery (PITR) with a 7-day retention.
AnswersB, C

Automated backups with 30-day retention satisfies the requirement.

Why this answer

Cloud SQL automated backups can be configured with a retention period of up to 365 days, and setting it to 30 days meets the requirement for daily backups with 30-day retention. Option C is correct because enabling high availability (HA) on a Cloud SQL instance with a regional persistent disk provides automatic failover to a standby instance in a different zone within the same region, ensuring high availability for the financial services application.

Exam trap

Google Cloud often tests the distinction between high availability (automatic failover within a region) and disaster recovery (cross-region replicas), leading candidates to incorrectly select cross-region replicas for failover when they are read-only and require manual promotion.

1066
MCQmedium

An organization needs to continuously replicate data from an on-premises PostgreSQL database to AlloyDB with minimal downtime during cutover. They have set up DMS continuous migration. During the cutover phase, what is the correct sequence of steps?

A.Update connection strings first, then promote destination, then verify lag.
B.Stop source database, promote destination, then update connection strings.
C.Quiesce writes to source, confirm DMS lag is 0, promote destination, update connection strings, verify application, keep source running read-only.
D.Promote target immediately, then verify lag, then update connection strings.
AnswerC

This is the correct cutover sequence.

Why this answer

The standard cutover: quiesce writes, verify DMS lag is 0, promote (stop replication), update connection strings, verify app, and keep source for rollback.

1067
MCQhard

A company is migrating a 2 TB PostgreSQL database to AlloyDB using Database Migration Service. They need to minimize downtime. After the initial full dump, the CDC lag remains high for hours. What should the engineer check first?

A.Cloud SQL Auth Proxy configuration
B.Binary log retention period
C.Source database resource utilization (CPU, IO)
D.AlloyDB cluster size
AnswerC

High source utilization can slow down log reading and replication.

Why this answer

High CDC lag often indicates resource constraints on the source or network bandwidth. Source database performance (CPU, IO) impacts replication speed.

1068
MCQhard

An application running on Cloud Run is experiencing high tail latency. The team wants to visualize which functions are consuming the most CPU time. Which Google Cloud tool should they use and how should they instrument the application?

A.Cloud Profiler with OpenTelemetry or Profiler agent
B.Cloud Monitoring with custom metrics for CPU
C.Cloud Trace with automatic instrumentation
D.Cloud Logging with structured logs
AnswerA

Cloud Profiler provides flame graphs showing CPU consumption per function, ideal for identifying hot functions.

Why this answer

Cloud Profiler provides continuous profiling (CPU, heap, etc.) with low overhead. For Cloud Run, the Profiler can be enabled via the Cloud Profiler Java agent or OpenTelemetry.

1069
MCQeasy

An SRE team has defined a service's availability SLI as the proportion of successful requests over a 5-minute window. They set an SLO of 99.9% over 30 days. What is the error budget for a 30-day period?

A.43 minutes 12 seconds
B.4 hours 19 minutes
C.7 minutes 12 seconds
D.43 minutes 12 seconds per week
AnswerA

0.1% of 30 days = 0.001 * 43200 min = 43.2 min = 43 min 12 sec.

Why this answer

Error budget = (100% - SLO) * total time. For 30 days (43200 minutes), 0.1% of that is 43.2 minutes. The closest option is 43 minutes 12 seconds.

1070
Multi-Selecthard

A DevOps engineer is designing a CI/CD pipeline for a Cloud Run service. They need to implement a canary deployment that sends 10% of traffic to a new revision initially, then gradually increases to 100% if metrics are healthy. They also need to roll back instantly if the canary fails. Which THREE configurations should they use? (Select THREE)

Select 3 answers
A.Configure Cloud Deploy with a canary strategy and metric thresholds
B.Use tags on the new revision for testing without affecting traffic
C.Use gcloud run deploy with --no-traffic to deploy the new revision without receiving traffic
D.Use gcloud run deploy with --to-revisions to split traffic, e.g., NEW=10, OLD=90
E.Use a manual approval gate in Cloud Deploy
AnswersA, B, D

Cloud Deploy can automate canary progression with metrics and rollback.

Why this answer

Cloud Deploy supports canary deployments with automated metric thresholds (e.g., latency, error rate) that control traffic progression. This allows the pipeline to gradually shift from 10% to 100% traffic based on real-time health checks, enabling automated rollback if thresholds are breached.

Exam trap

A common mistake in Google exams is confusing deploying a revision without traffic (Option C) with implementing a fully automated canary using Cloud Deploy metric thresholds (Option A). Candidates may think that --no-traffic alone satisfies the gradual increase requirement, but it does not provide automated progression or rollback based on metrics.

1071
MCQhard

A team is migrating a 10 TB PostgreSQL database to AlloyDB using DMS with continuous CDC. The migration starts, but the CDC phase is falling behind, with lag increasing over time. The source is a busy production database with high write throughput. What is the most effective action to reduce lag?

A.Reduce the batch size for the CDC phase.
B.Increase the source database's resources (CPU/memory) to handle logical replication load.
C.Increase the number of DMS worker nodes.
D.Add more indexes to the target AlloyDB tables.
AnswerB

The source may be under-resourced to publish changes fast enough.

Why this answer

Increasing the source database's resources (CPU/memory) directly addresses the root cause of CDC lag in a high-write-throughput PostgreSQL environment. DMS logical replication relies on the source's ability to decode WAL (Write-Ahead Log) records quickly; if the source is CPU- or memory-bound, it cannot keep up with the rate of changes, causing lag to grow. Scaling up the source reduces the bottleneck in WAL generation and decoding, allowing DMS to consume changes faster.

Exam trap

In Google Cloud exams, a common trap is to think that scaling DMS worker nodes (Option C) always fixes CDC lag, but the bottleneck in high-write environments is typically the source's ability to decode WAL, not DMS's processing capacity.

How to eliminate wrong answers

Option A is wrong because reducing the batch size for the CDC phase would actually increase the number of round trips and overhead, worsening lag rather than reducing it. Option C is wrong because increasing the number of DMS worker nodes does not help if the source cannot generate and decode WAL records fast enough; the bottleneck is on the source side, not the DMS processing capacity. Option D is wrong because adding more indexes to the target AlloyDB tables increases write overhead on the target, which can slow down apply operations and exacerbate lag, not reduce it.

1072
MCQmedium

A Cloud SQL instance stores financial data. They need to meet a 1-hour RPO and 30-minute RTO. What backup configuration should they use?

A.Export once a day to Cloud Storage.
B.Automatic backups plus binary logging to enable point-in-time recovery (PITR).
C.Enable high availability.
D.Automatic backups with a schedule of 1 hour.
AnswerB

PITR with binary logs allows recovery to any point in the last 7 days, meeting the 1-hour RPO.

Why this answer

Automatic backups combined with binary logging enable point-in-time recovery (PITR), which allows restoring the database to any point within the backup retention period. This configuration meets the 1-hour RPO by recovering transactions committed within the last hour, and the 30-minute RTO by using the most recent full backup plus binary logs to restore quickly.

Exam trap

Google Cloud often tests the distinction between high availability (HA) and backup/recovery; candidates mistakenly think HA alone satisfies RPO/RTO requirements, but HA only ensures uptime, not point-in-time data recovery.

How to eliminate wrong answers

Option A is wrong because exporting once a day to Cloud Storage provides an RPO of up to 24 hours, far exceeding the required 1-hour RPO, and restoring from an export can take significantly longer than 30 minutes. Option C is wrong because enabling high availability (HA) provides failover to a standby instance in case of zone failure, but does not address data backup or recovery point objectives; it does not protect against data corruption or accidental deletion. Option D is wrong because automatic backups with a 1-hour schedule create full backups every hour, but without binary logging, you can only restore to the exact backup timestamps, not to any point within the hour, so the effective RPO could be up to 1 hour plus the time to complete the backup, and recovery time may exceed 30 minutes due to the need to restore the full backup.

1073
Multi-Selectmedium

A team wants to implement a GitOps workflow for deploying applications to GKE. They want to use a tool that continuously reconciles the cluster state with a Git repository. Which TWO tools can they use? (Select TWO)

Select 2 answers
A.Cloud Deploy
B.Cloud Build
C.Argo CD
D.Skaffold
E.Config Sync
AnswersC, E

Argo CD is a popular GitOps operator for Kubernetes.

Why this answer

Argo CD is a declarative GitOps tool that continuously monitors a Git repository and automatically reconciles the cluster state to match the desired state defined in the repository. It directly supports the GitOps workflow requirement by polling or using webhooks to detect changes and applying them to GKE clusters.

Exam trap

This exam often tests the distinction between CI/CD pipeline tools (Cloud Build, Cloud Deploy) and GitOps reconciliation tools (Argo CD, Config Sync), leading candidates to select Cloud Deploy or Cloud Build because they associate them with deployment automation, even though they lack continuous drift detection from a Git repository.

1074
Multi-Selectmedium

Which TWO are best practices for designing a star schema in BigQuery for BI? (Choose two.)

Select 2 answers
A.Store dimension attributes in a single denormalized dimension table instead of multiple normalized tables.
B.Partition fact tables by low-cardinality columns like gender.
C.Pre-aggregate all measures at every possible grain in the fact table.
D.Avoid using joins entirely by storing all data in one wide table.
E.Use surrogate keys for dimension tables instead of natural keys.
AnswersA, E

Denormalization reduces join complexity.

Why this answer

In BigQuery, storing dimension attributes in a single denormalized dimension table (star schema) reduces the number of joins required in BI queries, improving query performance and simplifying SQL. BigQuery's columnar storage and distributed architecture handle denormalized dimensions efficiently, avoiding the overhead of multiple normalized tables that would require complex joins and slow down analytical queries.

Exam trap

Google Cloud often tests the misconception that denormalization is always bad, but in BigQuery's architecture, denormalized dimension tables are a best practice for BI workloads, unlike traditional OLTP databases.

1075
MCQhard

Your company runs a global application on Cloud Spanner. You notice that recent schema changes have caused a significant increase in latency for cross-node transactions. The previous schema used interleaved tables for parent-child relationships, but the new schema uses separate tables with foreign keys. What is the most likely cause of the increased latency?

A.The new schema uses foreign keys that require cross-node transactions.
B.The new schema does not use commit timestamps for versioning.
C.The new schema lacks secondary indexes on foreign key columns.
D.The Spanner instance was not resized after the schema change.
AnswerA

Foreign keys between separate tables can lead to distributed transactions across nodes.

Why this answer

The new schema uses separate tables with foreign keys instead of interleaved tables. In Cloud Spanner, interleaved tables guarantee that parent and child rows are co-located on the same split, allowing local joins without cross-node communication. Foreign keys between non-interleaved tables can reference rows stored on different splits, forcing distributed transactions that require two-phase commit across nodes, which significantly increases latency.

Exam trap

The trap here is that candidates may think foreign keys inherently cause performance issues due to constraint checking, but the real cause is the loss of data locality and resulting cross-split coordination in Spanner's distributed architecture.

How to eliminate wrong answers

Option B is wrong because commit timestamps are used for versioning and consistency, not for reducing cross-node transaction latency; omitting them would not cause the described latency increase. Option C is wrong because secondary indexes on foreign key columns improve query performance but do not eliminate the need for cross-node coordination when the referenced rows are on different splits. Option D is wrong because resizing the Spanner instance (adding/removing nodes) affects throughput and storage capacity, not the fundamental latency of cross-node transactions caused by non-interleaved schemas.

1076
MCQeasy

A company uses Cloud SQL for SQL Server. They want to store JSON data in a column and query it efficiently. What should they do?

A.Store each JSON field as a separate column.
B.Store JSON in an nvarchar(max) column and use JSON_VALUE in queries.
C.Use a TEXT column with no indexing.
D.Store JSON as a binary column and parse in application.
AnswerB

SQL Server's JSON support allows querying inside nvarchar(max) columns.

Why this answer

Cloud SQL for SQL Server supports JSON functions like JSON_VALUE to extract and query data from JSON stored in nvarchar(max) columns. This allows efficient querying without schema changes, leveraging SQL Server's built-in JSON support. Option B is correct because it uses the recommended data type and function for JSON storage and querying in SQL Server.

Exam trap

Candidates may mistakenly think Cloud SQL for SQL Server requires a separate JSON column type (like MySQL's JSON), but SQL Server stores JSON in nvarchar(max) and uses JSON_VALUE for querying. TEXT columns lack JSON function support.

How to eliminate wrong answers

Option A is wrong because storing each JSON field as a separate column defeats the purpose of JSON's flexible schema and increases schema complexity, making it harder to handle dynamic or nested data. Option C is wrong because TEXT columns are deprecated in SQL Server and do not support JSON functions like JSON_VALUE, nor can they be indexed efficiently for JSON queries. Option D is wrong because storing JSON as binary requires application-level parsing, losing the ability to use server-side JSON functions and indexes, which degrades query performance and adds complexity.

1077
MCQhard

A Cloud Spanner instance must handle 50,000 write mutations per second. You plan to use processing units (PUs). Each PU supports up to 2,000 mutations/second. What is the minimum number of PUs required?

A.25 PUs
B.100 PUs
C.10 PUs
D.50 PUs
AnswerA

25 PUs support 50,000 mutations per second.

Why this answer

50,000 / 2,000 = 25 PUs. However, Spanner requires at least 1,000 PUs (or 1 node = 1,000 PUs) for production, but the question asks for minimum PUs based on throughput formula. The calculated value is 25, but since 1 node = 1,000 PUs, the actual minimum is 1 node (1,000 PUs).

But the options likely include 25 if they ignore node minimum. To be consistent with GCP doc, the answer is 25 PUs if considering pure throughput, but note that minimum node is 1. Let's assume they want the calculated number.

1078
MCQhard

Refer to the exhibit. The application requires low-latency reads for users in Europe. The current cluster is in us-central1. What should they do?

A.Add a new cluster in a European region (e.g., europe-west1).
B.Increase the number of nodes in the existing cluster.
C.Use a multi-cluster instance with existing cluster.
D.Change the storage type to SSD in the existing cluster.
AnswerA

Adding a cluster in Europe allows reads to be served from a nearby location, reducing latency.

Why this answer

Adding a new cluster in a European region (e.g., europe-west1) is correct because it places data physically closer to users, reducing network latency for read operations. In a multi-region deployment, the application can read from the nearest cluster, achieving low-latency reads without changing the existing cluster's configuration. This approach leverages geographic proximity to minimize round-trip time (RTT) for European users.

Exam trap

Google Cloud often tests the misconception that scaling up (more nodes or faster storage) can solve geographic latency issues, when in fact only adding a regional cluster addresses the fundamental physics of network propagation delay.

How to eliminate wrong answers

Option B is wrong because increasing the number of nodes in the existing us-central1 cluster does not reduce the physical distance between European users and the data; network latency is dominated by propagation delay, not node count. Option C is wrong because a multi-cluster instance (e.g., in Cloud Spanner) is designed for global strong consistency and high availability, but it does not inherently provide low-latency reads for a specific region unless a new cluster is added in that region; the existing cluster alone cannot serve European users with low latency. Option D is wrong because changing the storage type to SSD improves I/O performance (e.g., lower disk latency) but does not address the network latency caused by geographic distance; the bottleneck for European users is the long-haul network path, not storage speed.

1079
MCQhard

A company stores sensor data in BigQuery. They have a table 'sensor_readings' with columns: sensor_id, reading_time, value. The table is partitioned by reading_time (hourly) and clustered by sensor_id. A BI query aggregates average value per sensor for the last week. The query still scans many bytes. What is the most likely cause?

A.The query uses SELECT * instead of specific columns
B.Clustering on sensor_id is ineffective
C.The table is not using columnar storage
D.Partition granularity is too fine for the query range
AnswerD

Hourly partitions for a week means 168 partitions scanned; coarser partitioning (daily) would scan 7 partitions, reducing bytes.

Why this answer

The query scans a full week of data (168 hourly partitions), and each partition must be read entirely even though only a subset of sensors may be active. Hourly partitioning over a 7-day range means the query engine must scan all 168 partitions, which can result in a large number of bytes being processed. Clustering on sensor_id helps within each partition but does not reduce the number of partitions scanned; the fine granularity of hourly partitioning is the primary cause of excessive bytes scanned.

Exam trap

Google Cloud often tests the misconception that clustering alone solves all performance issues, but the trap here is that clustering only helps when the query filters or aggregates on the clustered column—without such a filter, clustering does not reduce bytes scanned, and overly fine partitioning is the real culprit.

How to eliminate wrong answers

Option A is wrong because using SELECT * instead of specific columns would increase the bytes scanned, but the question states the query aggregates average value per sensor, which likely already selects only the needed columns; the core issue is partition pruning, not column projection. Option B is wrong because clustering on sensor_id is effective for reducing bytes scanned within each partition when filtering by sensor_id, but the query does not filter on sensor_id—it aggregates across all sensors—so clustering provides no benefit here. Option C is wrong because BigQuery always uses columnar storage (Capacitor format); the table is inherently columnar, so this is not a possible cause.

1080
Multi-Selecthard

A company uses Cloud Spanner with a schema that includes a table 'Events' with primary key (EventId, Timestamp). They need to run range queries on Timestamp across all events. They notice slow queries. Which two actions can improve query performance? (Choose two.)

Select 2 answers
A.Create a secondary index on Timestamp.
B.Create a covering index that includes all queried columns.
C.Add a hash prefix to EventId to distribute writes.
D.Use interleaving with a parent table on EventId.
E.Change the primary key to (Timestamp, EventId).
AnswersA, B

A secondary index on Timestamp allows efficient range scans.

Why this answer

Creating a secondary index on Timestamp allows Cloud Spanner to efficiently perform range queries on that column without scanning the entire table. Without this index, Spanner must perform a full table scan, which is slow for large datasets. The secondary index provides a sorted structure that directly supports the range scan operation.

Exam trap

Google often tests the distinction between indexing strategies that improve write distribution (like hash prefixes) versus those that improve read performance for range scans, and candidates mistakenly choose hash prefixes for range queries.

1081
MCQhard

A financial services company is using Terraform to manage their Google Cloud infrastructure. They have multiple environments (dev, staging, prod) and want to use a single Terraform configuration with separate state files per environment. They also need to store the Terraform state securely in a shared backend. Which approach should they use?

A.Use Terraform Cloud's workspaces feature with a GCS backend configured in the Terraform Cloud workspace settings.
B.Create separate Terraform configurations for each environment and store state in a single GCS bucket with different object names.
C.Use Terraform workspaces with a local backend and store state files in a Cloud Storage bucket manually.
D.Use Terraform workspaces with a GCS backend. Each workspace automatically creates a separate state file (e.g., env:/dev/project.tfstate).
AnswerD

Workspaces with a remote backend like GCS store state per workspace in the same bucket with different paths, enabling secure collaboration.

Why this answer

Terraform workspaces allow using the same configuration with separate state files for each environment. Using a GCS backend with a prefix per workspace stores the state files in separate objects.

1082
Multi-Selectmedium

An SRE team wants to implement chaos engineering on their GKE cluster. Which TWO options are valid tools or services for injecting faults into GKE workloads?

Select 2 answers
A.Cloud Audit Logs
B.Chaos Mesh
C.Cloud Endpoints
D.Cloud Scheduler
E.Traffic Director with HTTP fault filter
AnswersB, E

Chaos Mesh is a popular chaos engineering tool for Kubernetes.

Why this answer

Chaos Mesh is a dedicated chaos engineering platform for Kubernetes. Traffic Director's HTTP fault filter can inject faults at the proxy level for services within a mesh. Both can be used on GKE.

1083
MCQhard

An organization uses Terraform to manage infrastructure across multiple projects. They want to use a single shared Terraform state file for their production environment but isolate state for development environments. The team uses Terraform Cloud workspaces. Which state management approach is most appropriate?

A.Use Terraform Enterprise instead of Terraform Cloud because it supports state isolation.
B.Use a single GCS bucket as the backend and store all states in the same prefix.
C.Use a single Terraform workspace for all environments, with separate state files via the -state flag.
D.Create separate Terraform Cloud workspaces for production and development environments.
AnswerD

Correct. Workspaces provide isolated state per environment.

Why this answer

Terraform Cloud workspaces provide isolated state per workspace. Using separate workspaces for production and development keeps state isolated while leveraging a single Terraform Cloud organization.

1084
MCQmedium

A company uses Bigtable for time-series data with a row key format: 'deviceID#timestamp'. They notice write hotspotting on a few devices that generate high volumes of data. How should they redesign the row key to distribute writes evenly?

A.Add a random salt prefix to the row key: 'random_number#deviceID#timestamp'
B.Reverse the timestamp: 'deviceID#reverse_timestamp'
C.Use a monotonically increasing integer for the row key.
D.Store all data in a single column family and use column qualifiers for timestamps.
AnswerA

This uses a hash of deviceID, which is deterministic per device. All writes from a single device will have the same prefix and land on the same tablet, failing to distribute the load from that device.

Why this answer

Hotspotting occurs because rows for a single high-volume device all share the same deviceID prefix, causing writes to be directed to a single tablet. To distribute writes evenly, the row key must include a non-deterministic or varying component. Option A adds a random salt per write, which scatters the keys for the same device across many tablets, effectively distributing the load.

Option B still uses deviceID as the first part, so it doesn't spread writes. Option C creates monotonically increasing keys, leading to sequential writes and hotspotting. Option D does not change the row key, so it fails to address the prefix issue.

1085
MCQmedium

A company is designing a global user database that must support strong consistency and horizontal scaling with automatic failover. They have a 99.999% uptime requirement and need to serve writes from a single primary region with reads from multiple regions. Which Google Cloud database and configuration should they use?

A.Cloud Spanner multi-region configuration with a leader region and read-write and read-only replicas
B.Cloud Firestore in multi-region mode
C.Cloud Bigtable with replication and any-replica routing
D.Cloud SQL for PostgreSQL with cross-region read replicas and auto-failover
AnswerA

Spanner multi-region provides strong consistency, automatic failover, 99.999% SLA, and the ability to have read-write replicas in the leader region and read-only replicas elsewhere.

Why this answer

Cloud Spanner multi-region with read-write replicas in one region (leader) and read-only replicas in others provides strong consistency, global reads, and automatic failover. Bigtable is eventually consistent. Cloud SQL cannot span multiple regions natively.

Firestore does not provide 99.999% SLA.

1086
Multi-Selecthard

A team wants to implement an on-call rotation using Cloud Monitoring and third-party tools. Which three components are essential for setting up on-call alerting? (Choose THREE.)

Select 3 answers
A.An escalation policy
B.A notification channel (e.g., PagerDuty, OpsGenie)
C.A Cloud Monitoring alerting policy
D.A Cloud Monitoring dashboard
E.A runbook for incident response
AnswersA, B, C

Ensures alerts are handled if the primary contact does not respond.

Why this answer

Essential components: alerting policy to trigger notifications, notification channel to reach on-call engineers, and escalation policy to handle unacknowledged alerts. A dashboard and runbook are helpful but not essential for the on-call rotation itself.

1087
Multi-Selecteasy

Which TWO BigQuery features are specifically designed to accelerate BI dashboard query performance? (Choose TWO.)

Select 2 answers
A.Wildcard tables
B.Clustering
C.User-defined functions (UDFs)
D.Cached results
E.Column-level security
AnswersB, D

Clustering reduces data scanned by sorting data within partitions, speeding up filter-based queries.

Why this answer

Clustering (B) physically co-locates rows with similar values in the same storage blocks, allowing BigQuery to skip entire blocks when processing queries with filters on clustered columns. This dramatically reduces the amount of data scanned, directly accelerating BI dashboard queries that often filter by date, region, or customer ID. Cached results (D) store the output of recent queries for up to 24 hours, so repeated dashboard refreshes or concurrent user requests can be served instantly without re-scanning any data.

Exam trap

Google Cloud often tests the misconception that any feature that 'organizes' or 'processes' data (like wildcard tables or UDFs) improves performance, when in fact only features that reduce data scanned (clustering) or avoid re-execution (cached results) directly accelerate BI dashboards.

1088
MCQeasy

A database engineer is designing a data model for a BI dashboard that tracks daily sales by product category. The data source is a transactional database with a normalized schema. Which BigQuery feature should they use to update the fact table incrementally each day?

A.Streaming inserts
B.BigQuery Data Transfer Service
C.Scheduled queries with MERGE statements
D.Load jobs with WRITE_TRUNCATE
AnswerC

MERGE combines INSERT and UPDATE to handle incremental changes efficiently.

Why this answer

Scheduled queries with MERGE statements allow incremental updates by inserting new rows and updating existing ones based on a unique key, such as date and product category. This avoids full table reloads, making it efficient for daily fact table refreshes from a normalized transactional source.

Exam trap

The trap here is that candidates confuse 'incremental load' with 'streaming' (Option A), not realizing that streaming inserts are for real-time events, not batch updates from a transactional database.

How to eliminate wrong answers

Option A is wrong because streaming inserts are designed for real-time, row-by-row data ingestion, not for batch updating a fact table incrementally from a transactional database. Option B is wrong because BigQuery Data Transfer Service is used for automated imports from external SaaS sources (e.g., Google Ads, Amazon S3), not for executing custom SQL logic like MERGE against existing tables. Option D is wrong because WRITE_TRUNCATE replaces the entire table each load, which is inefficient and loses historical data, whereas incremental updates require preserving existing rows.

1089
MCQmedium

A company has a Cloud SQL for MySQL instance with point-in-time recovery (PITR) enabled. They need to restore the database to a specific time exactly 2 hours ago to recover from an accidental data deletion. What is the minimum requirement for this operation?

A.The instance must have a backup window configured within the last 2 hours
B.The instance must have at least one automatic backup taken after the desired restore time
C.Binary logging must be enabled, and the transaction log retention period must cover the desired restore time
D.The instance must be stopped before initiating the restore
AnswerC

PITR requires binary logging enabled and a transaction log retention period that includes the restore time (default 7 days).

Why this answer

PITR in Cloud SQL relies on binary log (binlog) backups. To restore to a specific time, you need to have binary logging enabled and transaction log retention set appropriately. The binlog retention period determines how far back you can perform PITR.

The default is 7 days, but you can configure it. The backup window and number of automatic backups are not directly related to PITR granularity.

1090
MCQeasy

A company uses BigQuery for BI. They need to create a table that stores daily sales data with millions of rows. The query pattern is to aggregate sales by month for specific product categories. Which table design is most cost-effective and performant?

A.Non-partitioned table with clustering on product_category
B.Partitioned table by date with clustering on product_category
C.Non-partitioned, non-clustered table with manual sharding by date
D.Partitioned table by product_category with clustering on date
AnswerB

Partitioning prunes irrelevant date ranges; clustering reduces data scanned for category filters.

Why this answer

Partitioning by date allows BigQuery to prune entire partitions when querying monthly aggregates, drastically reducing the data scanned. Clustering on product_category further organizes data within each partition, enabling efficient block-level pruning for category filters. This combination minimizes both cost (bytes billed) and query latency for the described workload.

Exam trap

Google Cloud often tests the misconception that clustering alone is sufficient for performance, ignoring that partitioning is essential for time-range queries to enable storage-level pruning and cost control.

How to eliminate wrong answers

Option A is wrong because a non-partitioned table forces BigQuery to scan all rows even for a single month, leading to higher costs and slower performance despite clustering on product_category. Option C is wrong because manual sharding (e.g., table names like sales_20250101) is a legacy pattern that requires complex query logic (UNION ALL) and loses automatic partition pruning, plus BigQuery discourages sharding in favor of native partitioning. Option D is wrong because partitioning by product_category would create many small partitions (one per category), which is inefficient for date-range queries; clustering on date cannot compensate for the lack of date-based partition pruning, so monthly aggregations would still scan all partitions.

1091
Multi-Selecteasy

A company wants to set up cost tracking by project, environment, and team. Which THREE methods should they use? (Choose 3)

Select 3 answers
A.Set up budget alerts to monitor spending.
B.Export billing data to BigQuery for detailed analysis.
C.Use Cloud Monitoring dashboards for billing.
D.Apply labels to resources (e.g., project, environment, team).
E.Use network tags for cost tracking.
AnswersA, B, D

Helps control costs proactively.

Why this answer

Labels and billing export to BigQuery are the primary methods. Budget alerts help manage costs. Tags are for network firewall rules.

Folders help organize but not directly track cost. Cloud Monitoring is for metrics.

1092
MCQmedium

A retail company uses Cloud Spanner for their OLTP system and wants to run BI queries on the same data without impacting transactional performance. Which solution should they implement?

A.Create a federated BigQuery query that reads from Spanner
B.Export Spanner data to Cloud Storage and then load into BigQuery manually
C.Use Cloud Dataflow to stream Spanner changes into BigQuery
D.Run BI queries directly on Spanner using read-only transactions
AnswerC

Dataflow captures changes from Spanner and loads them into BigQuery, separating BI workloads.

Why this answer

Cloud Dataflow can read the Cloud Spanner change streams and stream mutations into BigQuery in near real-time, enabling BI queries on fresh data without adding read load to the Spanner instance. This decouples the analytical workload from the transactional workload, preserving OLTP performance.

Exam trap

The trap here is that candidates assume read-only transactions are safe for BI workloads, but they still consume Spanner's CPU and memory resources, which can degrade transactional performance under concurrent analytical queries.

How to eliminate wrong answers

Option A is wrong because federated BigQuery queries against Spanner execute reads directly on the Spanner instance, which can consume CPU and impact transactional latency, especially under heavy BI query loads. Option B is wrong because manual exports to Cloud Storage and batch loads into BigQuery introduce significant latency and operational overhead, making it unsuitable for near-real-time BI requirements. Option D is wrong because even read-only transactions on Spanner consume instance resources and can contend with transactional writes, degrading OLTP performance under concurrent BI query loads.

1093
MCQeasy

Error Reporting automatically groups similar exceptions. Which Google Cloud services does Error Reporting integrate with to provide additional context?

A.Cloud Trace and Cloud Profiler
B.Cloud Logging and Cloud Monitoring
C.Cloud Logging and Cloud Trace
D.Cloud Monitoring and Cloud Profiler
AnswerC

Correct. Error Reporting links to logs and traces for each error group.

Why this answer

Error Reporting integrates with Cloud Logging to show log entries associated with errors, and with Cloud Trace to show trace details. Cloud Monitoring provides metrics, but not direct context per error. Cloud Profiler is for CPU/memory profiles, not error context.

1094
MCQeasy

A company is migrating a PostgreSQL database to Cloud SQL for PostgreSQL. They want to ensure minimal downtime during the migration. Which migration strategy should they use?

A.Set up application-level dual writes to both databases and switch over
B.Use Database Migration Service (DMS) with continuous replication
C.Create a read replica in Cloud SQL and promote it
D.Export the database using pg_dump and import into Cloud SQL
AnswerB

DMS provides minimal downtime via change data capture and replication.

Why this answer

Database Migration Service (DMS) with continuous replication is the correct strategy because it uses change data capture (CDC) to replicate ongoing transactions from the source PostgreSQL database to Cloud SQL with minimal lag. This allows the application to remain fully operational during the migration, and the cutover can be performed in seconds by stopping writes to the source and promoting the target, achieving near-zero downtime.

Exam trap

The trap here is that candidates often confuse 'read replica promotion' (which only works within Cloud SQL) with cross-environment migration, or they assume that pg_dump can be used with minimal downtime by running it on a replica, but the export still locks tables or requires a consistent snapshot that interrupts writes.

How to eliminate wrong answers

Option A is wrong because application-level dual writes require modifying application code to write to both databases simultaneously, which introduces complexity, potential data inconsistency, and does not guarantee minimal downtime during the actual cutover. Option C is wrong because creating a read replica in Cloud SQL and promoting it is not a supported migration path from an external PostgreSQL database; Cloud SQL read replicas can only be created from a Cloud SQL primary instance, not from an on-premises or external source. Option D is wrong because exporting with pg_dump and importing into Cloud SQL is a batch, offline process that requires the source database to be read-only or stopped during the export to ensure consistency, resulting in significant downtime.

1095
MCQmedium

A BI report requires a running total of sales over the last 30 days for each product. The data is in a BigQuery table with columns: sale_date, product_id, amount. Which SQL window function is most efficient?

A.Use GROUP BY with SUM(amount)
B.Use SUM(amount) OVER (ORDER BY sale_date ROWS BETWEEN 30 PRECEDING AND CURRENT ROW)
C.Use SUM(amount) OVER (ORDER BY sale_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
D.Use a correlated subquery to sum over previous dates
AnswerB

Correct. It uses a window frame of 30 rows preceding, which approximates a 30-day rolling sum when data is daily and no gaps. Note: a proper date-based window would use RANGE with an interval, but this is the best among the options.

Why this answer

The most efficient among the given choices for a 30-day rolling sum, because it uses a window function with `ROWS BETWEEN 30 PRECEDING AND CURRENT ROW` to limit the sum to the last 30 rows. Although a true time-based window would require `RANGE BETWEEN INTERVAL 29 DAY PRECEDING AND CURRENT ROW` with `PARTITION BY product_id`, that is not offered. Option C gives a cumulative sum (unbounded) which is not a 30-day total.

Options A and D are set-based or inefficient. Thus B is the best available.

Exam trap

The trap is confusing `ROWS BETWEEN 30 PRECEDING` (row count) with a date-based rolling window. Candidates might choose C for 'running total' but it ignores the 30-day limit. A true 30-day rolling sum requires `RANGE BETWEEN INTERVAL 29 DAY PRECEDING AND CURRENT ROW` with `PARTITION BY product_id`, which is not listed.

How to eliminate wrong answers

Option A is wrong because GROUP BY with SUM(amount) aggregates sales per day or per product, but it cannot produce a running total across dates; it loses the row-level context needed for cumulative calculations. Option B is wrong because `ROWS BETWEEN 30 PRECEDING AND CURRENT ROW` sums exactly 31 rows (30 preceding + current), which is a fixed row count, not a time-based window of 30 days; if dates are missing or irregular, this will not correctly represent sales over the last 30 calendar days. Option D is wrong because a correlated subquery to sum over previous dates is inefficient and scales poorly; it requires a separate subquery execution for each row, leading to O(n²) performance, whereas a window function operates in a single pass over the data.

1096
Multi-Selecthard

An SRE team wants to conduct chaos engineering on a GKE cluster to test resilience. Which TWO tools or services can be used? (Choose 2.)

Select 2 answers
A.Cloud Scheduler
B.Cloud Build
C.Traffic Director fault injection
D.Chaos Mesh
E.Cloud Run for Anthos
AnswersC, D

Traffic Director can inject faults into traffic via Envoy.

Why this answer

Chaos Mesh is a popular chaos engineering tool for Kubernetes. Traffic Director can also inject faults via Envoy sidecar proxy configuration.

1097
MCQmedium

An organization wants to reduce toil by automating a recurring process: every night, a script must run Cloud Build to rebuild a Docker image and deploy it to a GKE cluster. The script currently requires manual invocation by an engineer. Which Google Cloud service can trigger this automation on a schedule without manual intervention?

A.Cloud Scheduler
B.Workflows
C.Cloud Tasks
D.Cloud Functions
AnswerA

Cloud Scheduler is a fully managed cron job service that can trigger HTTP endpoints, Pub/Sub topics, or App Engine.

Why this answer

Cloud Scheduler can trigger Cloud Build or Pub/Sub on a schedule, which can then trigger a Cloud Function or Workflow to run the build and deploy.

1098
MCQeasy

A company wants to migrate their on-premises PostgreSQL database to Cloud SQL using DMS. The source database is behind a firewall and does not have a public IP. The target Cloud SQL instance uses a private IP. How should the engineer connect the source to DMS?

A.Assign a public IP to the source database.
B.Use DMS with a connection profile that specifies the source's private IP without any network configuration.
C.Use a VPN or VPC peering to connect the source network to the GCP VPC.
D.Configure Cloud SQL Auth Proxy on the source.
AnswerC

VPC peering or VPN allows DMS to reach the source via private IP.

Why this answer

For private connectivity, VPC peering between the source network and GCP VPC is required. Cloud SQL Auth Proxy is for connecting to Cloud SQL, not for source.

1099
Multi-Selectmedium

A company is migrating a PostgreSQL database to Cloud SQL using DMS continuous migration. After the full dump, the CDC phase is replicating changes. To prepare for cutover, which TWO actions should the engineer take? (Choose 2)

Select 2 answers
A.Verify that the DMS migration job lag is 0 seconds.
B.Enable binary logging on the source.
C.Take a full backup of the source.
D.Delete the DMS migration job to stop replication.
E.Quiesce all write operations to the source database.
AnswersA, E

Ensures source and target are in sync.

Why this answer

Quiesce writes to ensure no new changes, and confirm DMS lag is 0 before promoting.

1100
MCQeasy

A data analyst needs to run ad-hoc SQL queries on a large dataset stored in Google Cloud Storage (CSV files). They do not want to manage any infrastructure. Which service should they use?

A.Dataproc
B.Cloud Spanner
C.BigQuery
D.Cloud SQL
AnswerC

BigQuery can query data in GCS using external tables without loading.

Why this answer

BigQuery is a serverless data warehouse that can query external data sources like GCS directly using federated queries.

1101
MCQmedium

A DevOps engineer is using Cloud Deploy to promote a release from staging to production. They want to require a manual approval before the release is deployed to production. What should they configure in the delivery pipeline?

A.Use a Cloud Build trigger with a manual approval step.
B.Add a preDeploy hook to the production target that runs a Cloud Run Job to send a notification.
C.Add a postDeploy hook that checks for approval.
D.Configure the production target with requireApproval: true.
AnswerD

This adds a manual approval gate. The deployment will pause until approved via Cloud Deploy console or CLI.

Why this answer

Cloud Deploy natively supports manual approval gates at the target level. Setting `requireApproval: true` on the production target in the delivery pipeline configuration ensures that a release must receive explicit approval via the Cloud Deploy console or API before it can proceed to that target. This is the intended mechanism for adding a manual approval step without external services or hooks.

Exam trap

Google Cloud often tests the distinction between hooks (which execute code but do not pause for human input) and the native `requireApproval` setting, leading candidates to mistakenly think a preDeploy hook can implement a manual approval gate.

How to eliminate wrong answers

Option A is wrong because Cloud Build triggers are used for building and testing, not for managing deployment approvals within Cloud Deploy; manual approval in Cloud Build is a separate feature for build pipelines, not for release promotion. Option B is wrong because a preDeploy hook runs custom logic before deployment but does not pause for manual approval; it cannot block the deployment pending human sign-off. Option C is wrong because a postDeploy hook runs after deployment has already occurred, so it cannot prevent the release from being deployed to production.

1102
MCQmedium

A company uses AlloyDB for an e-commerce platform. They want to achieve the highest availability within a single region. What configuration should they use, and what is the expected failover RTO?

A.Use a primary instance with a standby in the same zone; RTO less than 10 seconds
B.Use a primary instance with multiple read pools; RTO less than 5 seconds
C.Use a primary instance with a cross-region read replica; RTO less than 1 minute
D.Use a primary instance with a standby in a different zone in the same region; RTO less than 30 seconds
AnswerD

AlloyDB HA uses a primary and standby in different zones within the same region. Automatic failover completes in under 30 seconds.

Why this answer

AlloyDB offers an HA configuration with a primary instance and a standby (read pool) in different zones within the same region. Automatic failover occurs in less than 30 seconds. Cross-zone failover is automatic.

There is no cross-region HA in AlloyDB (you can use cross-region replicas but that requires manual promotion).

1103
MCQmedium

An SRE team wants to track the amount of toil their team performs each week and set a goal to keep it under 50% of working time. Which approach should they use?

A.Use Cloud Monitoring to automatically detect and log toil activities based on predefined patterns
B.Ask team members to estimate toil as a percentage in daily stand-ups
C.Ignore toil tracking; focus only on SLOs
D.Use Cloud Tasks to record toil
AnswerA

Automated detection is preferred; Cloud Monitoring can track manual interventions.

Why this answer

Toil tracking is essential for SRE teams to ensure that time spent on repetitive, manual tasks does not exceed 50%. While manual methods like spreadsheets are possible, the best practice is to automate detection using monitoring tools. Cloud Monitoring can be configured with custom metrics and alerting policies to identify patterns indicative of toil (e.g., repeated manual interventions, high alert fatigue).

By defining patterns that correlate with toil, the team can automatically log and track the time spent on such activities, enabling objective measurement against the 50% target. This approach is more reliable and scalable than self-reported estimates at stand-ups, which are subjective and prone to bias. Therefore, option A is correct as it uses Cloud Monitoring to automate toil detection.

1104
MCQeasy

Which Cloud Monitoring dashboard chart type is best suited to show the distribution of request latencies across multiple services over time?

A.Scorecard
B.Line chart
C.Heatmap
D.Stacked bar chart
AnswerC

Heatmaps show distribution across two axes with color intensity, perfect for latency distributions.

Why this answer

Heatmap charts are ideal for showing distribution across two dimensions (e.g., service and time) with color intensity representing count or latency.

1105
MCQhard

A team is using Cloud Spanner with a primary key of UUID v4 values. They notice that read performance is suboptimal for range scans over a subset of keys. Which index strategy improves range scan performance?

A.Add a hash prefix to the primary key
B.Create a secondary index using INTERLEAVE IN the base table
C.Remove the UUID primary key and use a sequential key
D.Create a secondary index without interleaving (global index)
AnswerB

An interleaved index stores index entries with the base data, making range scans local to one split.

Why this answer

A secondary index with an interleaved parent stores index entries in the same tablet as the base table rows, reducing cross-node fan-out for range scans. A hash prefix would help for point lookups but not range scans. Storing the index in a separate table (global index) increases latency.

Dropping the index makes range scans worse.

1106
Multi-Selecthard

A team manages a Cloud Spanner database and needs to perform a schema change to add a new column to an existing table and create a secondary index. They want to avoid downtime and ensure the changes are applied without blocking reads or writes. Which two statements are correct about making these changes in Spanner? (Choose TWO.)

Select 2 answers
A.The CREATE INDEX statement will block reads on the table during index creation
B.Indexes can only be created as unique indexes
C.The ALTER TABLE statement to add a column is non-blocking and can be executed using gcloud spanner databases ddl update
D.Both ALTER TABLE and CREATE INDEX can be submitted together in a single DDL batch
E.To create an index, you must first export and re-import the data
AnswersC, D

Spanner DDL changes are online and non-blocking.

Why this answer

In Cloud Spanner, both ALTER TABLE (to add columns) and CREATE INDEX are online, non-blocking operations. They can be run via DDL statements in the gcloud CLI or console. Indexes can be created as UNIQUE to enforce uniqueness.

1107
MCQeasy

A company is using Cloud SQL and wants to automatically increase storage when disk usage reaches a threshold. What should they configure?

A.Enable 'auto-storage increase' in the instance settings.
B.Use Active Assist recommendations to manually resize.
C.Set up a Cloud Monitoring alert to manually increase storage when usage exceeds 80%.
D.Configure a Cloud Function to resize the disk via API when threshold is reached.
AnswerA

Correct. This setting automatically increases storage.

Why this answer

Cloud SQL provides a built-in 'auto-storage increase' setting that, when enabled, automatically increases the instance's storage capacity when disk usage reaches a predefined threshold (typically 90% or when free space drops below a certain amount). This eliminates the need for manual intervention or custom automation, ensuring high availability and preventing out-of-disk errors.

Exam trap

The trap here is that candidates may over-engineer a solution (e.g., Cloud Functions or Monitoring alerts) when a simple, built-in configuration option exists, or they may confuse Active Assist recommendations with automated actions.

How to eliminate wrong answers

Option B is wrong because Active Assist provides recommendations for optimization (e.g., idle resources, underutilized instances) but does not automatically resize storage; it only suggests manual actions. Option C is wrong because setting up a Cloud Monitoring alert to manually increase storage still requires human intervention, which defeats the purpose of automatic scaling and introduces risk of downtime if the alert is missed. Option D is wrong because while a Cloud Function could theoretically resize the disk via API, this approach is unnecessarily complex, introduces custom code maintenance, and is not a native Cloud SQL feature; the built-in 'auto-storage increase' is the recommended and simpler solution.

1108
MCQmedium

A company is using Cloud SQL for PostgreSQL and needs to perform point-in-time recovery (PITR) to recover from a logical error that occurred 30 minutes ago. They have already configured automated backups. What additional configuration is required?

A.Create a cross-region backup replica to enable PITR.
B.Set the 'transaction log retention' to a value between 1 and 7 days.
C.Enable binary logging on the instance.
D.Increase the storage size to accommodate logs.
AnswerB

WAL archiving is controlled by this setting for PostgreSQL instances.

Why this answer

Cloud SQL PITR requires write-ahead log (WAL) archiving, which is enabled by setting the 'transaction log retention' in days (1-7). Automated backups alone do not capture continuous transaction logs.

1109
MCQeasy

Which Google Cloud service can be used to inject artificial delays into HTTP traffic to test service resilience?

A.Cloud Endpoints
B.Traffic Director
C.Cloud Armor
D.Cloud Load Balancing
AnswerB

Traffic Director can inject faults like latency and errors into HTTP traffic.

Why this answer

Traffic Director supports fault injection, including delay and abort faults, for HTTP traffic. This is used in chaos engineering to test service resilience. Chaos Mesh is for Kubernetes, but Traffic Director is the managed service for traffic management.

1110
MCQhard

A company is implementing Binary Authorization with Cloud Deploy. They want to ensure that only images signed by the CI system (using Cloud Build) are deployed to production. What must be configured?

A.Configure Artifact Registry to automatically sign images on push
B.Use Cloud Deploy's canary deployment with audit logging to verify image provenance
C.Enable Binary Authorization on the GKE cluster and configure the admission controller to use Cloud Key Management Service
D.In Cloud Build, use the `gcloud beta artifacts docker images sign` command after building the image, and set the Binary Authorization policy to require attestations from that signer
AnswerD

Correct: signing occurs in the pipeline, and policy requires attestation.

Why this answer

It describes the exact workflow: Cloud Build signs the container image using the `gcloud beta artifacts docker images sign` command, which creates a cryptographic attestation stored in Cloud Key Management Service (KMS). The Binary Authorization policy is then configured to require an attestation from that specific signer (the CI system's KMS key), ensuring only images signed by the CI pipeline can be deployed to production.

Exam trap

Candidates often assume that enabling Binary Authorization on the GKE cluster alone ensures only signed images are deployed. They overlook the critical steps of actually signing the image in Cloud Build and configuring the Binary Authorization policy to require attestations from that specific KMS key signer.

How to eliminate wrong answers

Option A is wrong because Artifact Registry does not automatically sign images on push; signing is a separate, explicit step that must be performed by a trusted entity like Cloud Build. Option B is wrong because canary deployment and audit logging verify deployment behavior and provenance, but they do not enforce cryptographic attestation or prevent unsigned images from being deployed. Option C is wrong because while enabling Binary Authorization on the GKE cluster is necessary, simply configuring the admission controller to use Cloud KMS is insufficient; the policy must specifically require attestations from a known signer, and the images must be signed by that signer.

1111
MCQeasy

Refer to the exhibit. The company plans to store 3 TB of data in this instance. What is the minimum number of nodes required? (Assume 2 TB per node for HDD and 4 TB per node for SSD; this instance uses SSD.)

A.4
B.1
C.2
D.3
AnswerB

Correct. One node provides 4 TB raw storage, which is enough to hold 3 TB of data.

Why this answer

The question explicitly assumes 4 TB per SSD node and asks for the minimum number of nodes required to store 3 TB of data. Since 4 TB is greater than 3 TB, a single node provides sufficient raw storage capacity. The question does not specify any requirements for high availability, replication, or redundancy, so the minimum number of nodes is 1.

Exam trap

The trap is that candidates may incorrectly assume that multiple nodes are always required for database instances on Google Cloud, ignoring the explicit assumption that each node provides 4 TB of SSD storage. The question only asks about storage capacity, not high availability or replication.

How to eliminate wrong answers

Option A (4) is wrong because 4 nodes would provide 16 TB of raw SSD storage, which is excessive for only 3 TB of data and would be an inefficient use of resources. Option B (1) is wrong because a single node cannot provide data redundancy or high availability; in a production database cluster, you need at least 2 nodes to support replication and failover. Option D (3) is wrong because 3 nodes would provide 12 TB of raw storage, but after accounting for replication (typically 2 copies), the effective storage is 6 TB, which is more than needed; 2 nodes are sufficient and more cost-effective.

1112
MCQeasy

A company wants to migrate their on-premises SQL Server database to Cloud SQL for PostgreSQL using Database Migration Service. They need to minimize downtime. The source database is 2 TB and the network link has 1 Gbps bandwidth. What should they do first?

A.Use pg_dump to export the database and then import into Cloud SQL.
B.Create a one-time migration job to copy the database during a maintenance window.
C.Create a continuous migration job with DMS using a VPC peering connection.
D.Use mysqldump to export and import the database.
AnswerC

Continuous migration allows CDC to replicate changes, minimizing downtime.

Why this answer

For minimal downtime, a continuous migration job should be used so that after the initial full dump, ongoing changes are replicated until cutover.

1113
MCQmedium

A gaming company uses Cloud Spanner to store player profiles and game state. The database has a table 'Players' with a monotonically increasing integer primary key. During a global launch event, write latency spikes and throughput drops. The issue is traced to hotspotting. Which schema change should the team implement to mitigate this?

A.Add a hash prefix to the primary key by salting the player ID.
B.Change primary key to use a combination of timestamp and player ID.
C.Convert the primary key to a UUID stored as bytes.
D.Create a parent-child interleaved table structure.
AnswerA

Salting distributes writes evenly.

Why this answer

Adding a hash prefix to the monotonically increasing integer primary key distributes writes across multiple Cloud Spanner splits, preventing hotspotting. Without this, sequential player IDs cause all new inserts to target the same split, leading to write contention and throughput drops during high-volume events like a global launch.

Exam trap

A common misconception in Cloud Spanner is that any random key (like a UUID) automatically solves hotspotting, but the key's distribution across splits depends on the key's prefix—without explicit salting or hashing, even UUIDs can cluster if the leading bytes are not random enough.

How to eliminate wrong answers

Option B is wrong because combining a timestamp with player ID still results in a monotonically increasing key (timestamps are sequential), which does not eliminate the hotspotting issue—writes will still concentrate on the last split. Option C is wrong because while a UUID stored as bytes is globally unique and random, it does not inherently distribute writes evenly across splits in Cloud Spanner; the key distribution depends on the split key design, and UUIDs can still cause hotspots if not properly salted or hashed. Option D is wrong because parent-child interleaved tables optimize join performance and locality for related data, but they do not address write hotspotting on the primary key of the parent table—the hotspotting would persist on the monotonically increasing parent key.

1114
MCQeasy

A team is planning the cutover for a DMS continuous migration. They want to minimize downtime. What is the correct cutover procedure?

A.Update connection strings to point to destination, then promote.
B.Promote destination immediately, then stop source.
C.Stop source, promote destination, update connection strings.
D.Quiesce writes, confirm lag 0, promote destination, update connection strings, verify.
AnswerD

This minimizes downtime and ensures data consistency.

Why this answer

The standard cutover: quiesce writes to source, verify DMS lag is 0, promote the destination, update application connection strings, then verify. Keeping source read-only allows rollback.

1115
MCQhard

A healthcare company uses Cloud SQL for MySQL for patient records. They need to export data for a compliance audit. They must ensure the export includes all changes within a specific time window (e.g., last 24 hours). They have binary logging enabled. What is the best method to obtain a consistent snapshot of the data as of the audit time?

A.Use Database Migration Service's continuous export.
B.Use Cloud SQL clone to create a new instance from a point-in-time, then export from clone.
C.Use mysqldump to export at the audit time.
D.Use Cloud SQL's export feature with a specific backup-id.
AnswerB

Cloning uses binary logs to recreate the exact state at a given time, providing a consistent snapshot.

Why this answer

Cloud SQL's clone feature can create a new instance from a specific point-in-time using binary logs, providing a consistent snapshot of the database as of the audit time. This ensures all changes within the last 24 hours are captured without impacting the production instance, and the export can then be performed from the clone.

Exam trap

The trap here is that candidates may think mysqldump or the export feature can capture a point-in-time snapshot, but they overlook that Cloud SQL's clone with PITR is the only method that provides a consistent, non-disruptive snapshot at an arbitrary time within the binary log retention window.

How to eliminate wrong answers

Option A is wrong because Database Migration Service's continuous export is designed for ongoing replication to external targets, not for creating a point-in-time consistent snapshot from Cloud SQL's binary logs. Option C is wrong because mysqldump at audit time would lock tables and impact production performance, and it cannot guarantee a consistent snapshot that includes all changes within a specific time window without binary log replay. Option D is wrong because Cloud SQL's export with a specific backup-id only exports from a full backup, not from a point-in-time that includes all changes within the last 24 hours; backups are typically taken at scheduled intervals, not at the exact audit time.

1116
MCQhard

You have a Cloud Spanner instance and need to add a new column and a secondary index to an existing table. The table is heavily used by production traffic. Which approach minimizes downtime and performance impact?

A.Export the table to Avro, modify the schema, import back into a new table, then rename
B.Create a new table with the new schema, use a temporary application to dual-write and backfill, then switch
C.Use 'gcloud spanner databases ddl update' to add the column and create the index concurrently
D.Drop the table and recreate it with the new schema, then restore from backup
AnswerC

Spanner DDL changes are online and non-blocking; they can be applied without downtime.

Why this answer

Spanner supports online schema changes: you can add columns and indexes without downtime. The gcloud command 'gcloud spanner databases ddl update' applies DDL changes in the background without locking the table. Dropping and recreating the table causes downtime.

Creating a new table and copying data requires application changes and downtime.

1117
MCQmedium

A team is migrating a legacy application from a relational database to Cloud Firestore. The existing schema has a Customers table and an Orders table with a foreign key. The application often shows orders for a customer. What is the recommended data modeling approach in Firestore?

A.Use Cloud SQL instead of Firestore for this relationship
B.Create a top-level collection 'Orders' and use reference fields to link to customers
C.Store orders as a nested array within the customer document
D.Create separate collections for customers and orders, and use composite indexes for queries
AnswerC

Embedding orders (as subcollection or array) allows fetching all orders in one document read, which is efficient for this access pattern.

Why this answer

Cloud Firestore is optimized for denormalized, document-based data models. Storing orders as a nested array within the customer document allows the application to retrieve all orders for a customer with a single document read, which is efficient for the common query pattern of 'showing orders for a customer.' This approach avoids the need for joins or multiple queries, aligning with Firestore's strengths in read-heavy, hierarchical data access.

Exam trap

The trap here is that candidates often default to relational normalization (separate collections with references or indexes) without considering Firestore's document-based nature, where denormalization and embedding are recommended for common read patterns to avoid multiple queries.

How to eliminate wrong answers

Option A is wrong because the question explicitly asks for a Firestore data modeling approach, and recommending Cloud SQL avoids the core objective of migrating to Firestore. Option B is wrong because while using reference fields in a top-level 'Orders' collection is possible, it requires multiple reads or a collection group query to fetch orders for a customer, which is less efficient than embedding for the described 'often shows orders for a customer' pattern. Option D is wrong because creating separate collections with composite indexes still necessitates multiple queries or a join-like operation, which Firestore does not natively support, and it introduces unnecessary complexity and latency for the common read pattern.

1118
MCQmedium

A media company uses Cloud Bigtable to serve user recommendations with low latency. They want to implement disaster recovery with a secondary cluster in a different region. They need automatic failover without manual DNS changes. Which routing policy should they configure?

A.Enable any-replica routing policy on the Bigtable cluster
B.Use single-cluster routing with manual DNS failover
C.Implement application-managed routing with a custom health check
D.Configure read-failover routing policy and use Cloud DNS health checks
AnswerD

read-failover with health checks enables automatic failover to the secondary cluster without manual DNS updates, meeting the requirement.

Why this answer

The read-failover policy uses health checks to automatically route traffic to the secondary cluster if the primary becomes unhealthy. Any-replica sends requests to the closest cluster regardless of health. Manual DNS changes would be required for any-replica after a failure.

Application-managed routing is not a built-in Bigtable feature.

1119
MCQhard

A company is designing a Firestore schema for a chat application with millions of messages. They need to support real-time updates and efficient querying of recent messages per conversation. Which schema and indexing strategy is optimal?

A.Store all messages in a single top-level collection. Create an index on (conversationId, timestamp desc).
B.Store messages in a subcollection with a single-field index on timestamp.
C.Store messages as a subcollection under each conversation document. Create a composite index on (conversationId, timestamp desc).
D.Use a parent document with a nested array of recent messages, and a separate collection for older messages.
AnswerC

Subcollections scale well and composite index enables efficient per-conversation queries.

Why this answer

Storing messages as a subcollection under each conversation document allows for natural data locality and efficient queries. The composite index on (conversationId, timestamp desc) enables Firestore to quickly retrieve the most recent messages for a given conversation without scanning unrelated data, which is critical for real-time updates at scale.

Exam trap

The trap here is that candidates often choose Option A because they think a single collection with a composite index is simpler, but they overlook Firestore's index scaling limits and the performance hit from querying across all conversations in a high-volume chat app.

How to eliminate wrong answers

Option A is wrong because a single top-level collection with millions of messages creates a massive index that degrades query performance and increases latency for real-time updates, as Firestore must scan across all conversations. Option B is wrong because a single-field index on timestamp alone cannot efficiently filter by conversationId, leading to full collection scans or requiring client-side filtering, which breaks real-time requirements. Option D is wrong because storing recent messages in a nested array within a parent document violates Firestore's 1 MiB document size limit and does not support scalable querying for millions of messages, while the separate collection for older messages introduces complexity without indexing benefits.

1120
MCQmedium

A team manages Terraform state for multiple projects using a single GCS bucket. They need to ensure that state operations are not concurrent to avoid corruption. What should they do?

A.Store state in a single file and use IAM to allow only one user at a time.
B.Use `terraform force_unlock` before each run.
C.Configure the GCS backend with `prefix` per project and rely on Terraform's built-in state locking via GCS.
D.Enable object versioning on the GCS bucket.
AnswerC

GCS backend automatically uses locking via object writes. Using separate prefixes isolates states, and locking prevents concurrent operations.

Why this answer

Terraform's GCS backend natively supports state locking using the GCS object's generation number. By configuring a unique `prefix` per project, each project's state is stored in a separate object within the same bucket. Terraform automatically acquires a lock by creating a temporary lock file in GCS before any state operation, and releases it afterward, preventing concurrent modifications and state corruption.

Exam trap

The trap here is that candidates may confuse object versioning (which provides history) with state locking (which prevents concurrent writes), or think that IAM alone can manage concurrency, when in fact Terraform's built-in locking via GCS is the correct and automated solution.

How to eliminate wrong answers

Option A is wrong because storing all state in a single file would cause conflicts and IAM does not provide fine-grained concurrency control; Terraform's locking mechanism is designed to handle this at the object level, not via user permissions. Option B is wrong because `terraform force_unlock` is a manual command to break a stuck lock, not a preventive measure; running it before each run would defeat the purpose of locking and could still allow concurrent operations. Option D is wrong because enabling object versioning on the GCS bucket provides history and rollback capabilities but does not prevent concurrent writes; without locking, two simultaneous `terraform apply` commands could still corrupt the state.

1121
Multi-Selectmedium

You are investigating a performance issue in a distributed application. You want to identify the services causing high latency. Which TWO tools should you use together? (Choose two.)

Select 2 answers
A.Error Reporting
B.Cloud Trace
C.Cloud Profiler
D.Cloud Logging
E.Cloud Monitoring
AnswersB, C

Provides trace analysis and latency distribution.

Why this answer

Cloud Trace analyzes latency distributions and identifies slow requests. Cloud Profiler identifies hot functions consuming CPU/memory. Cloud Monitoring shows metrics but not traces, Cloud Logging shows logs, and Error Reporting shows errors.

1122
Multi-Selectmedium

A team is migrating a MySQL database to Cloud SQL using DMS with continuous CDC. They want to minimize downtime during cutover. Which three actions should they take as part of the cutover plan? (Choose 3)

Select 3 answers
A.Quiesce write operations on the source database.
B.Delete the migration job immediately after promotion.
C.Promote the destination Cloud SQL instance.
D.Confirm DMS replication lag is 0.
E.Disable binary logging on the source.
AnswersA, C, D

Stop writes to ensure consistency.

Why this answer

During cutover, the steps are: quiesce writes on source, confirm DMS lag is 0, promote the destination, update application connection strings, and keep the source available for rollback. Disabling binary logging or deleting the source prematurely are not part of a safe cutover.

1123
MCQeasy

A company wants to migrate a 100 GB MySQL database to Cloud SQL with minimal application changes. Which migration tool should they use?

A.mysqldump
B.Database Migration Service
C.BigQuery Data Transfer Service
D.Storage Transfer Service
AnswerB

DMS supports MySQL to Cloud SQL migrations with minimal changes.

Why this answer

Database Migration Service (DMS) is the correct tool because it is designed specifically for migrating databases to Cloud SQL with minimal downtime and minimal application changes. DMS uses a combination of initial snapshot and continuous change data capture (CDC) to replicate the source MySQL database to Cloud SQL, allowing the application to point to the new database with only a connection string update.

Exam trap

Google Cloud often tests the distinction between database migration tools and general data transfer or backup tools, so the trap here is that candidates might choose mysqldump (Option A) because it is a familiar MySQL tool, overlooking that it causes downtime and is not optimized for live migrations to Cloud SQL.

How to eliminate wrong answers

Option A is wrong because mysqldump is a logical backup tool that exports data as SQL statements, which requires taking the source database offline or locking tables during the dump, and the import process can be slow and error-prone for a 100 GB database, leading to significant application downtime and potential data inconsistency. Option C is wrong because BigQuery Data Transfer Service is designed for loading data into BigQuery, a data warehouse, not for migrating operational databases to Cloud SQL, and it does not support MySQL as a source or Cloud SQL as a target. Option D is wrong because Storage Transfer Service is used for moving objects from on-premises or other cloud storage to Google Cloud Storage (GCS), not for migrating live databases to Cloud SQL, and it cannot handle the transactional consistency or schema requirements of a MySQL database.

1124
MCQmedium

A company is designing a database schema for a global e-commerce platform. Orders are created with high frequency, and order status updates occur frequently. The team needs to choose a primary key strategy for the orders table in Spanner. Which approach minimizes hot-spotting?

A.Use a monotonically increasing integer (e.g., auto-increment)
B.Use a timestamp as the primary key
C.Use a composite key with user_id and order_date
D.Use a universally unique identifier (UUID) as the primary key
AnswerD

Distributes writes uniformly across splits.

Why this answer

In Spanner, monotonically increasing or time-ordered primary keys cause hot-spotting because all new writes are directed to the same tablet server, creating a single point of contention. UUIDs are randomly distributed, ensuring writes are spread evenly across the entire key space, which minimizes hot-spotting and maximizes write throughput.

Exam trap

Google Cloud often tests the misconception that composite keys with a user_id prefix are sufficient to avoid hot-spotting, but the trap is that any time-ordered component (like order_date) in the key still causes sequential writes to target the same tablet, negating the distribution benefit.

How to eliminate wrong answers

Option A is wrong because monotonically increasing integers concentrate writes on the last tablet, causing severe hot-spotting. Option B is wrong because timestamps are inherently monotonically increasing, leading to the same hot-spotting issue as auto-increment keys. Option C is wrong because a composite key with user_id and order_date still has a time-ordered component (order_date) that causes sequential writes to cluster on the same tablet, especially for users placing orders in quick succession.

1125
MCQeasy

A company runs a critical application on AlloyDB with a primary instance and a read pool. They want to achieve the fastest possible automatic failover during a zone outage, with minimal data loss. What is the expected RTO and RPO for AlloyDB's automatic failover within the same region?

A.RTO < 5 minutes, RPO ~ 1 second
B.RTO < 60 seconds, RPO ~ 0
C.RTO < 30 seconds, RPO < 1 minute
D.RTO < 30 seconds, RPO ~ 0
AnswerD

AlloyDB high-availability failover occurs in under 30 seconds with zero data loss due to synchronous replication.

Why this answer

AlloyDB provides automatic failover to a standby node within the same region, typically completing in under 30 seconds. Replication is synchronous within the region, so RPO is zero (no data loss).

Page 14

Page 15 of 20

Page 16