Google Professional Cloud Database Engineer (PCDE) — Questions 751825

1000 questions total · 14pages · All types, answers revealed

Page 10

Page 11 of 14

Page 12
751
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.

752
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.

753
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.

754
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.

755
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.

756
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

Option C is correct because 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.

757
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.

758
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.

759
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
AnswerC

This window function efficiently computes a running total across all rows up to the current row.

Why this answer

Option C is correct because it uses a window function with `ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW` to compute a running total over all rows up to the current row. However, the question asks for a running total over the last 30 days, not all preceding rows. The most efficient approach for a 30-day sliding window is actually `ROWS BETWEEN 29 PRECEDING AND CURRENT ROW` (or `RANGE BETWEEN INTERVAL 29 DAY PRECEDING AND CURRENT ROW` in BigQuery), but among the given options, C is the only one that produces a running total (cumulative sum) rather than a fixed 30-day window.

Option C is marked as correct in the answer key, but note that it does not limit to 30 days; it sums all prior sales. In BigQuery, for a true 30-day rolling sum, `RANGE BETWEEN INTERVAL 29 DAY PRECEDING AND CURRENT ROW` is the correct syntax.

Exam trap

Google Cloud often tests the distinction between `ROWS` and `RANGE` frame specifications, and the trap here is that candidates confuse a fixed row count (ROWS BETWEEN 30 PRECEDING) with a time-based window (RANGE BETWEEN INTERVAL 30 DAY PRECEDING), leading them to choose Option B even though it does not correctly implement a 30-day rolling sum.

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.

760
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.

761
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.

762
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

Option D is correct because 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

Cisco 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.

763
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 can be done by manual logging, but the best practice is to use a time tracking tool integrated with issue tracking. Google Cloud does not provide a built-in toil tracker. The team can use a combination of tools like Jira or a simple spreadsheet.

However, for a GCP exam, the expected answer might be to use a custom dashboard in Cloud Monitoring or to use a third-party tool. Since the question is about SRE practices, the correct answer is to have a documented process and use a time tracking system. Among options, one says 'Use a manual time tracking spreadsheet and review weekly' which is simple but not automated.

Another says 'Automate toil detection using Cloud Monitoring and track time automatically' which is ideal. I'll go with automation.

764
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.

765
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.

766
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.

767
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

Option D is correct because 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

The trap here is that candidates assume enabling Binary Authorization alone is sufficient, but they overlook the critical requirement to both sign the image and configure the policy to require attestations from that specific 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.

768
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
AnswerC

1 node provides 2 TB of SSD storage, so 2 nodes are needed for 3 TB.

Why this answer

The instance uses SSD storage, which provides 4 TB per node. To store 3 TB of data, a single node with 4 TB SSD would suffice, but the question asks for the minimum number of nodes required. However, the correct answer is 2 because in a distributed database like Couchbase (commonly tested in PCDE), data is replicated across nodes for high availability and durability.

With 1 node, there is no redundancy; with 2 nodes, you can store 3 TB of data while maintaining a replica, as each node contributes 4 TB of usable storage, and the effective storage after replication is 4 TB (2 nodes × 4 TB / 2 replicas = 4 TB), which is sufficient for 3 TB.

Exam trap

Google Cloud often tests the misconception that you only need enough raw storage to hold the data, ignoring the replication factor required for high availability in a clustered database environment.

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.

769
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

Option B is correct because 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.

770
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

Option C is correct because 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.

771
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

Option C is correct because 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.

772
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.

773
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.

774
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.

775
MCQhard

A company runs a Cloud Spanner database with a multi-region configuration. They notice that write latency is higher than expected for clients in a region far from the leader region. What action should be taken to reduce write latency?

A.Reduce the number of replicas
B.Use directed reads
C.Change the default leader option to 'NEAREST'
D.Enable follower reads for writes
AnswerC

This places the leader in the nearest region, reducing write latency for that region.

Why this answer

Option C is correct because changing the default leader option to 'NEAREST' allows Cloud Spanner to dynamically assign the leader replica to the region closest to the majority of write requests, reducing the network round-trip time for clients far from the original leader region. This directly addresses the high write latency caused by geographic distance, as writes must be confirmed by the leader before committing.

Exam trap

The trap here is that candidates confuse directed reads (which reduce read latency) with leader placement options (which reduce write latency), or incorrectly assume that reducing replicas or using follower reads can improve write performance.

How to eliminate wrong answers

Option A is wrong because reducing the number of replicas does not reduce write latency; it may actually increase latency by reducing read availability and fault tolerance, and writes still require leader confirmation. Option B is wrong because directed reads are used to route read requests to the nearest replica for lower read latency, but they do not affect write latency, as writes must still go through the leader. Option D is wrong because follower reads are a read-only feature that allows reads from non-leader replicas; writes cannot be performed on followers, so enabling follower reads for writes is technically invalid.

776
MCQhard

You are designing a schema for a Cloud SQL for PostgreSQL database that supports full-text search across millions of product descriptions. The application requires fast search results ranked by relevance. Which schema design is most appropriate?

A.Use a tsvector column with a GIN index on that column
B.Use a separate Elasticsearch instance
C.Use a LIKE '%term%' query with a B-tree index
D.Use materialized view with trigram indexes
AnswerA

PostgreSQL full-text search with tsvector/GIN is purpose-built for fast ranked search.

Why this answer

Option A is correct because PostgreSQL's tsvector data type, combined with a GIN index, is specifically designed for full-text search. It preprocesses text into lexemes, supports stemming and ranking, and the GIN index enables fast lookups for millions of rows, meeting the requirement for relevance-ranked results.

Exam trap

Cisco often tests the misconception that LIKE queries with B-tree indexes are sufficient for full-text search, but the trap here is that LIKE '%term%' cannot leverage a B-tree index and forces a sequential scan, while tsvector with GIN is purpose-built for this workload.

How to eliminate wrong answers

Option B is wrong because it introduces an external Elasticsearch instance, which violates the schema design constraint for Cloud SQL for PostgreSQL and adds operational complexity; the question asks for a schema design within PostgreSQL. Option C is wrong because a LIKE '%term%' query cannot use a B-tree index efficiently—it requires a full table scan, which is impractical for millions of product descriptions. Option D is wrong because materialized views with trigram indexes (pg_trgm) support fuzzy matching but are not optimized for full-text search ranking and relevance scoring; they are better suited for pattern matching, not linguistic search.

777
MCQmedium

A Cloud Spanner instance is experiencing high CPU utilization (above 80%) on multiple nodes. The database is used for an e-commerce application with a high volume of read-write transactions. The application uses the googlesql dialect and runs typical OLTP queries. You have already reviewed the query performance and found that most queries are efficient. Which initial step should you take to reduce CPU utilization?

A.Use the INFORMATION_SCHEMA.INDEXES view to identify and drop unused or redundant secondary indexes.
B.Adjust the application to use staleness of 5 seconds for reads to reduce CPU for read-write transactions.
C.Increase the number of nodes in the Spanner instance to spread the CPU load.
D.Create a separate read-only replica pool to offload read traffic.
AnswerA

Unused indexes cause extra write CPU and storage; removing them reduces CPU utilization directly.

Why this answer

Option A is correct because high CPU utilization in Cloud Spanner often stems from excessive secondary index maintenance during write operations. Dropping unused or redundant indexes reduces the write amplification and CPU overhead per transaction, directly lowering CPU usage without compromising query performance, as the queries are already efficient.

Exam trap

Google Cloud often tests the misconception that scaling out (adding nodes) is the first step for performance issues, when in reality, eliminating unnecessary index maintenance is a more cost-effective and direct solution for CPU-bound write-heavy workloads.

How to eliminate wrong answers

Option B is wrong because adjusting staleness to 5 seconds for reads reduces read CPU by allowing stale reads, but the problem states high CPU utilization on multiple nodes with read-write transactions; stale reads do not reduce the CPU cost of write operations or index maintenance, which are the primary drivers. Option C is wrong because increasing nodes spreads the CPU load but does not address the root cause; it may mask the issue and increase costs without resolving the underlying index overhead. Option D is wrong because creating a separate read-only replica pool offloads read traffic, but the high CPU is from read-write transactions, and read-only replicas cannot handle writes; they do not reduce CPU for write-heavy workloads.

778
MCQmedium

A company uses BigQuery materialized views to pre-aggregate sales data for a BI dashboard. The dashboard requires near-real-time data, but the materialized view currently reflects data up to 30 minutes old. What is the most effective way to reduce the refresh interval without significantly increasing costs?

A.Reduce the max_staleness parameter of the materialized view.
B.Disable automatic refresh and schedule a manual refresh every minute.
C.Use a streaming buffer with the base table to reduce latency.
D.Create additional materialized views with overlapping time windows.
AnswerA

Lower max_staleness forces more frequent refreshes.

Why this answer

Reducing the `max_staleness` parameter directly controls the maximum acceptable age of the data in a BigQuery materialized view. By lowering this value, you force the view to refresh more frequently, achieving near-real-time data without incurring the cost of a full manual refresh or additional streaming infrastructure. This parameter is designed to balance freshness against cost, making it the most effective and efficient solution.

Exam trap

Google Cloud often tests the misconception that reducing staleness requires manual scheduling or additional streaming, when in fact the `max_staleness` parameter is the built-in, cost-effective mechanism for controlling refresh frequency in BigQuery materialized views.

How to eliminate wrong answers

Option B is wrong because disabling automatic refresh and scheduling a manual refresh every minute would significantly increase costs due to repeated full recomputation of the materialized view, and it also introduces operational complexity without leveraging BigQuery's built-in incremental refresh mechanism. Option C is wrong because using a streaming buffer with the base table reduces latency for new data ingestion but does not affect the refresh interval of the materialized view itself; the view still relies on its own staleness setting. Option D is wrong because creating additional materialized views with overlapping time windows does not reduce the refresh interval for any single view; it increases storage and processing costs without improving freshness, as each view would still have its own staleness constraint.

779
MCQeasy

Refer to the exhibit. What is the effect of the partition_expiration_days option?

A.The table's storage cost is reduced by 365%
B.Queries that reference data older than 365 days will fail
C.Partitions older than 365 days are automatically deleted
D.The table will be partitioned into 365 partitions
AnswerC

The option enables automatic partition expiration, deleting old partitions to free storage.

Why this answer

The `partition_expiration_days` option in BigQuery automatically drops partitions that are older than the specified number of days, reducing storage costs and simplifying lifecycle management. When set to 365, any partition with a date older than 365 days from the current date is deleted by BigQuery's background maintenance process.

Exam trap

Google Cloud often tests the distinction between automatic deletion (expiration) and query failure—candidates mistakenly think expired partitions cause errors, but BigQuery simply treats them as non-existent, returning empty results for those date ranges.

How to eliminate wrong answers

Option A is wrong because storage cost is reduced by the amount of data in expired partitions, not by a fixed percentage like 365%; the percentage depends on the table's total size. Option B is wrong because queries referencing data older than 365 days will simply return no rows from those expired partitions, but the query itself will not fail—it will succeed with an empty result for the expired range. Option D is wrong because the option does not control the number of partitions; it controls the expiration age of partitions, while the number of partitions is determined by the partitioning column's granularity and the data's date range.

780
MCQhard

A company has a BigQuery table that stores JSON data in a single column. They want to allow BI analysts to query nested fields using standard SQL. What is the best approach to make the data more query-friendly for BI tools?

A.Unnest the JSON into multiple columns using a persistent table with a flattened schema.
B.Use BigQuery's automatic schema detection to infer the structure.
C.Create a view that uses JSON_QUERY and JSON_VALUE functions to expose nested fields as columns.
D.Use the EXTRACT function to parse JSON fields in each query.
AnswerA

A flattened table stores JSON fields as columns once, enabling efficient columnar scanning and BI tool compatibility.

Why this answer

Option A is correct because flattening the JSON into a persistent table with a normalized schema eliminates the need for runtime parsing, allowing BI tools to query nested fields directly with standard SQL. This approach improves query performance by avoiding repeated JSON function calls and enables the use of indexed columns, which is critical for interactive BI workloads.

Exam trap

Google Cloud often tests the misconception that a view or function-based approach is sufficient for performance, when in fact persistent schema flattening is required for BI tools to achieve optimal query performance and schema compatibility.

How to eliminate wrong answers

Option B is wrong because BigQuery's automatic schema detection only works during table creation from external data sources (e.g., Cloud Storage) and cannot retroactively infer or restructure an existing table with a single JSON column. Option C is wrong because a view using JSON_QUERY and JSON_VALUE still requires runtime parsing of the JSON string for every query, which degrades performance and prevents BI tools from leveraging column-level optimizations like partitioning or clustering. Option D is wrong because the EXTRACT function in BigQuery is designed for extracting date/time parts, not for parsing JSON fields; using it would be syntactically incorrect and non-functional.

781
MCQhard

A company runs a critical application on Cloud SQL for PostgreSQL with a primary instance in us-central1 and a cross-region read replica in us-west1 for disaster recovery. The database engineer is responsible for ensuring that in the event of a regional outage in us-central1, the application can continue with minimal data loss and within 15 minutes of downtime. The application writes about 1000 transactions per second. The current setup has automated backups enabled with point-in-time recovery (7-day retention) and the cross-region replica is configured with asynchronous replication. Which action should the database engineer take to meet the recovery objectives?

A.Promote the cross-region read replica to a new primary and redirect application traffic.
B.Change the cross-region replica to synchronous replication and enable automatic failover.
C.Create a new instance from the latest backup in us-west1 and redirect traffic.
D.Increase automated backup frequency to every hour and ensure binary logging is enabled.
AnswerA

Promoting a read replica is fast (minutes) and meets the 15-minute RTO. Data loss is limited to the replication lag (seconds/minutes).

Why this answer

Option D is correct because using Database Migration Service (DMS) for continuous migration is not needed; instead, promoting the cross-region read replica is the fastest failover method. However, with asynchronous replication, some data loss may occur. To minimize data loss, they should set replication lag alerts and automate failover procedures.

Option A is wrong because backup-based recovery takes longer than 15 minutes for 1TB. Option B is wrong because synchronous replication across regions is not supported in Cloud SQL for PostgreSQL. Option C is wrong because increasing backup frequency doesn't help with fast failover.

782
Multi-Selectmedium

Your team is designing a schema for Cloud SQL (MySQL) for a content management system. You need to implement full-text search on article content. Which TWO schema design choices are appropriate? (Choose two.)

Select 2 answers
A.Use the LIKE operator with wildcards for pattern matching.
B.Store article content in a Cloud Storage bucket and query metadata.
C.Normalize content into a separate table and use joins.
D.Use Cloud SQL's built-in full-text search feature.
E.Add a FULLTEXT index on the content column.
AnswersD, E

Cloud SQL for MySQL supports full-text search via FULLTEXT indexes and MATCH AGAINST queries.

Why this answer

Cloud SQL for MySQL provides built-in full-text search capabilities that allow efficient searching of text data. Adding a FULLTEXT index on the content column enables the use of MATCH...AGAINST queries, which are optimized for natural language search and are far more performant than LIKE operations. This is the correct approach because it leverages the database engine's native indexing and search algorithms.

Exam trap

Cisco often tests the misconception that LIKE with wildcards is acceptable for search, but the trap is that LIKE '%term%' cannot use indexes and causes full table scans, while FULLTEXT indexes are specifically designed for efficient text search in MySQL.

783
MCQmedium

A database administrator notices that a Cloud SQL for MySQL instance is experiencing high CPU usage during peak hours. The instance has 4 vCPUs and 15 GB of memory. The query patterns are mostly read-intensive with occasional writes. Which action should the DBA take first to address the high CPU usage?

A.Increase the max_connections flag to allow more concurrent connections
B.Enable read pool to offload read queries
C.Increase the machine type to 8 vCPUs
D.Analyze slow query log and optimize queries
AnswerD

Analyzing slow queries helps identify inefficient SQL that consumes CPU; optimizing is the most effective first step.

Why this answer

High CPU usage in a read-intensive Cloud SQL for MySQL instance is most often caused by inefficient queries that consume excessive CPU cycles. Analyzing the slow query log allows the DBA to identify and optimize these queries, addressing the root cause directly. Increasing resources or changing configuration without understanding the workload can mask the problem and lead to unnecessary costs.

Exam trap

Google Cloud often tests the misconception that scaling up resources is the first troubleshooting step, when in reality, analyzing and optimizing query performance is the most effective initial action for CPU-bound issues in Cloud SQL.

How to eliminate wrong answers

Option A is wrong because increasing max_connections can actually worsen CPU usage by allowing more concurrent queries to compete for CPU resources, potentially increasing contention. Option B is wrong because read pool offloading is a feature for Cloud SQL for PostgreSQL, not MySQL, and MySQL instances use read replicas instead. Option C is wrong because scaling up to 8 vCPUs is a reactive measure that does not address the underlying query inefficiency; it increases cost without guaranteeing performance improvement if the queries are poorly optimized.

784
MCQeasy

You need to set up a Cloud Monitoring alert for a Cloud Spanner instance to notify when the CPU utilization exceeds a threshold that could indicate performance degradation. What is the recommended CPU utilization threshold for Cloud Spanner?

A.90%
B.40%
C.80%
D.65%
AnswerD

65% is the recommended threshold to maintain performance headroom.

Why this answer

The recommended CPU utilization threshold for Cloud Spanner is 65%. This value is based on Google's best practices, as sustained CPU usage above 65% can lead to increased latency and performance degradation due to queuing and contention. Setting the alert at 65% provides a proactive warning before the instance reaches a critical state, allowing time for scaling or optimization.

Exam trap

Google Cloud often tests the misconception that higher thresholds like 80% or 90% are acceptable for alerting, but Cloud Spanner's distributed architecture requires a lower threshold to account for queuing effects and maintain consistent low latency.

How to eliminate wrong answers

Option A is wrong because 90% is too high; at this level, Cloud Spanner nodes experience significant queuing delays and potential throttling, making it a reactive rather than proactive threshold. Option B is wrong because 40% is too conservative; it would trigger false alarms unnecessarily, as Cloud Spanner is designed to handle moderate CPU loads without performance issues. Option C is wrong because 80% is above the recommended threshold; while it may indicate high utilization, it risks performance degradation before the alert fires, as queuing effects become noticeable above 65%.

785
MCQeasy

Refer to the exhibit. A BI analyst runs a query to get total sales for the last 7 days. The query filters on sale_date BETWEEN '2023-01-01' AND '2023-01-07'. What is the primary benefit of the partitioning defined in the table?

A.It reduces the amount of data scanned by pruning partitions.
B.It automatically creates indexes on sale_date.
C.It allows the query to use clustering.
D.It enables streaming inserts.
AnswerA

Partition pruning scans only relevant partitions, minimizing data processing.

Why this answer

Partitioning in BigQuery (and similar data warehouses) physically divides the table into segments based on the partition column (sale_date). When the query filters on sale_date BETWEEN '2023-01-01' AND '2023-01-07', the query engine can perform partition pruning, scanning only the partitions that match the date range instead of the entire table. This dramatically reduces the amount of data read, lowering query cost and improving performance.

Exam trap

Google Cloud often tests the distinction between partitioning (which prunes data at the storage level) and clustering (which sorts data within partitions), leading candidates to mistakenly choose clustering as the primary benefit when the question explicitly asks about the partitioning definition.

How to eliminate wrong answers

Option B is wrong because partitioning does not automatically create indexes; BigQuery uses a columnar storage format and does not rely on traditional indexes. Option C is wrong because clustering is a separate feature that co-locates data within partitions based on sort order, but the primary benefit described here is partition pruning, not clustering. Option D is wrong because streaming inserts are a method for ingesting real-time data and are unrelated to the query performance benefit of partition pruning.

786
Multi-Selecthard

A company's Cloud Spanner database currently uses a regional configuration in us-central1. Due to growth, the database must support global reads with low latency and maintain strong consistency. The database engineer is evaluating options. Which THREE considerations should the engineer include in the design? (Choose three.)

Select 3 answers
A.Use interleaved tables to reduce the number of reads required for hierarchical data.
B.Select a configuration that places the leader region close to the majority of write traffic.
C.Ensure the schema uses primary keys that distribute writes evenly across nodes.
D.Add read replicas in remote regions to serve reads with eventual consistency.
E.Use a multi-region instance configuration that includes multiple read-write regions.
AnswersB, C, E

Leader placement reduces write latency and indirectly benefits read latency.

Why this answer

Option B is correct because in a multi-region Cloud Spanner configuration, the leader region handles all writes and must be placed close to the majority of write traffic to minimize write latency. This ensures strong consistency, as all reads are served from the same leader region by default, and global reads with low latency require careful leader placement to avoid cross-region round trips.

Exam trap

Google Cloud often tests the misconception that read replicas can provide strong consistency, but in Cloud Spanner, read replicas only serve eventually consistent reads, while strong consistency requires contacting the leader region or using a multi-region configuration with read-write regions.

787
MCQeasy

When designing a schema for a data warehouse in BigQuery, which table type is most cost-effective for storing raw event data that will be queried by date range filters?

A.A partitioned table partitioned by date column
B.A table with integer range partitioning on an ID column
C.A regular table with no partitioning
D.A regular table clustered on timestamp
AnswerA

Only scans partitions matching the date range, minimizing cost.

Why this answer

Partitioned tables in BigQuery allow you to divide a table into segments based on a date, timestamp, or integer column. When querying with a date range filter, BigQuery can prune partitions, scanning only the relevant data rather than the entire table. This dramatically reduces the amount of data processed, lowering query costs and improving performance, making it the most cost-effective choice for storing raw event data that is frequently queried by date.

Exam trap

Cisco often tests the misconception that clustering alone is sufficient for cost savings on date-range queries, but without partitioning, BigQuery cannot skip entire storage blocks, so clustering only provides minor sorting benefits and does not reduce the amount of data scanned.

How to eliminate wrong answers

Option B is wrong because integer range partitioning on an ID column does not align with date-based queries; it would require scanning all partitions or using inefficient filters, and it does not leverage BigQuery's optimized date pruning. Option C is wrong because a regular table with no partitioning forces a full table scan on every query, even when filtering by date, leading to maximum cost and slower performance. Option D is wrong because clustering on timestamp alone, without partitioning, still requires scanning the entire table; clustering only sorts data within a table, but BigQuery cannot skip entire storage blocks without partitioning, so cost savings are minimal compared to partitioning.

788
MCQmedium

A site reliability team wants to define an SLO for a service with a target availability of 99.9% over a 30-day window. The error budget is exhausted. Which action MUST the team take?

A.Ignore the budget and continue normal development.
B.Freeze all non-critical releases until the budget recovers.
C.Deploy a new feature to attract more users.
D.Increase the SLO to 99.95% to make up for lost budget.
AnswerB

This is the standard SRE practice: halt risky changes to protect users and rebuild trust.

Why this answer

When the error budget is exhausted, the SRE practice is to stop all non-critical releases and focus on improving reliability, as defined by the error budget policy. This aligns with SRE principles of using the budget to balance velocity and stability.

789
MCQeasy

A company is using Cloud Run for a service that performs background computation even when there are no incoming requests. They find that the service is being throttled and not completing the background work. What is the most likely cause and solution?

A.The service needs more memory; increase memory limit.
B.The service must have CPU always-on enabled.
C.The service needs to set min instances to 1.
D.The service should be migrated to GKE.
AnswerB

CPU always-on prevents throttling when no request is being processed, allowing background tasks to run.

Why this answer

Cloud Run instances have CPU throttled when not handling requests. Setting CPU always-on ensures the instance can use CPU continuously for background tasks.

790
MCQhard

A company uses a shared VPC with multiple service projects. The network team wants to allow a DevOps team to create Cloud Run services in a service project but prevent them from creating Cloud Run services with public access (allowUnauthenticated invocations). What is the best approach?

A.Use the organization policy constraint `run.allowedIngress` to restrict ingress to internal only.
B.Configure the shared VPC firewall to block incoming traffic from the internet to Cloud Run services.
C.Create a custom IAM role that includes only the run.services.create permission, and assign it to the DevOps team.
D.Use a service account with the run.services.create permission and enforce that the DevOps team uses it.
AnswerA

This constraint prevents public access for all Cloud Run services under the organization.

Why this answer

Organization policy `run.allowedIngress` can restrict Cloud Run services to only allow internal or internal-and-cloud-load-balancing traffic, effectively blocking public access. IAM roles control who can create services but not their properties. Service accounts would be used by services themselves, not for enforcement.

791
MCQeasy

A team is deploying a new application on Google Kubernetes Engine (GKE) that uses Cloud Spanner. They want to minimize latency for read operations. Which Spanner configuration should they use?

A.Use a multi-region configuration with default leader preference set to the region where the application runs.
B.Use a regional instance with read replicas in the same region.
C.Use a single-region instance and configure the leader preference to the application's zone.
D.Use a single-region instance and enable read-only replicas in multiple zones.
AnswerB

Regional instances with read replicas in the same region provide low-latency reads with strong consistency.

Why this answer

Option B is correct because a regional instance with read replicas in the same region provides the lowest read latency for applications running in that region. Cloud Spanner's regional configuration keeps all data and replicas within a single Google Cloud region, minimizing network round-trips. Read replicas in the same region can serve strongly consistent reads without cross-region hops, which is optimal for latency-sensitive workloads.

Exam trap

Google Cloud often tests the misconception that multi-region configurations with leader preference reduce read latency, when in fact leader preference only affects write commit latency, not read latency, and multi-region setups inherently add cross-region latency for reads.

How to eliminate wrong answers

Option A is wrong because multi-region configurations introduce cross-region replication and quorum overhead, which increases read latency compared to a regional setup, even with leader preference set to the application's region. Option C is wrong because a single-region instance with leader preference set to a zone does not add read replicas; leader preference only affects write latency and transaction commit, not read latency. Option D is wrong because read-only replicas in multiple zones within a single-region instance do not reduce read latency for the application; they are used for failover and disaster recovery, not for serving reads with lower latency.

792
MCQhard

You need to set up an alert that fires when the total number of errors in a specific Cloud Logging log view exceeds 10 in any 5-minute window over the last 1 hour. Which combination of alerting policy conditions and log-based metric is appropriate?

A.Use a forecast condition on the log-based metric to predict when errors will exceed 10
B.Create a log-based counter metric and use a metric threshold condition with rolling window 5 minutes, threshold 10
C.Use a logs-based alerting policy directly with a filter and set count > 10 in 5 minutes
D.Create a metric threshold alert on the log entry count metric with duration 5 minutes and threshold 10
AnswerB

Correct. Log-based counter metrics count log entries; alert threshold condition evaluates on rolling window.

Why this answer

To count errors from logs, you create a log-based counter metric. Then set an alert with condition type 'metric threshold', using the counter metric, with aggregation window '5 minutes', and trigger if value > 10. The 'condition absent' is for missing data, not threshold. 'Forecast' predicts future values.

Standard configuration: log-based counter metric + metric threshold alert.

793
MCQeasy

A developer needs a local development database that mirrors a Cloud SQL instance. What is the best practice?

A.Use Cloud SQL Proxy to connect locally
B.Use Cloud Functions
C.Export data and import to local MySQL
D.Use Cloud SQL's public IP
AnswerC

Exporting the database provides a dump that can be loaded into a local MySQL instance.

Why this answer

Option C is correct because exporting the Cloud SQL instance data (e.g., using `gcloud sql export sql` or `mysqldump`) and importing it into a local MySQL database creates an exact, offline replica of the production schema and data. This allows the developer to work with a full, consistent dataset without network latency, connection overhead, or dependency on Cloud SQL availability, which is the standard best practice for local development mirrors.

Exam trap

The trap here is that candidates confuse 'connecting to a remote database' (Options A and D) with 'creating a local copy,' failing to recognize that a true development mirror must be an offline, independent replica to avoid latency, security, and availability issues.

How to eliminate wrong answers

Option A is wrong because Cloud SQL Proxy is a secure tunnel for connecting to a live Cloud SQL instance over the internet; it does not create a local copy of the database, so the developer remains dependent on network connectivity and the production instance, which defeats the purpose of a local development mirror. Option B is wrong because Cloud Functions are serverless compute units for event-driven code, not a database service or tool for replicating or mirroring database state; they cannot store or serve a local copy of a Cloud SQL database. Option D is wrong because using Cloud SQL's public IP exposes the instance directly to the internet, which is a security risk and still requires a live connection to the remote database, not a local development mirror.

794
MCQhard

A financial institution uses Cloud SQL for MySQL to handle transaction processing. They need to generate daily BI reports that aggregate millions of transactions per account. The BI queries are CPU-intensive and degrade OLTP performance. What is the most effective solution?

A.Schedule reports during off-peak hours only
B.Create a Cloud SQL read replica and run reports against it
C.Use Cloud SQL's high availability configuration
D.Upgrade the primary instance to a higher machine type
AnswerB

A read replica offloads read queries from the primary, preserving OLTP performance.

Why this answer

Creating a Cloud SQL read replica allows you to offload BI reporting queries to a separate instance that replicates data from the primary using MySQL's asynchronous replication. This isolates the CPU-intensive aggregation queries from the OLTP workload, preventing performance degradation on the primary instance while still providing near-real-time data for reports.

Exam trap

Google Cloud often tests the misconception that high availability (HA) instances can serve read traffic, when in fact the standby in an HA configuration is passive and cannot be used for read offloading.

How to eliminate wrong answers

Option A is wrong because scheduling reports during off-peak hours only reduces contention but does not eliminate the CPU load from the primary instance, which can still impact OLTP performance if reports run concurrently with any other workload. Option C is wrong because Cloud SQL's high availability configuration uses a standby instance in a different zone for failover, not for read scaling; it does not offload query processing and the standby cannot serve read traffic. Option D is wrong because upgrading the primary instance to a higher machine type increases capacity but does not isolate the BI workload, so CPU-intensive queries will still compete with OLTP transactions for resources on the same instance.

795
MCQeasy

You have a Memorystore for Redis instance used as a session store. You notice that the instance is experiencing high eviction rates. What is the best first step to take?

A.Increase the instance size or set a TTL policy on session keys.
B.Monitor memory usage but take no action.
C.Add a read replica to offload read traffic.
D.Enable persistence (AOF or RDB) to reduce memory usage.
AnswerA

More memory or key expiration reduces evictions.

Why this answer

High eviction rates in Memorystore for Redis indicate that the instance is running out of memory and the Redis `maxmemory-policy` is actively removing keys. The best first step is to either increase the instance size to provide more memory or set a TTL (Time-To-Live) policy on session keys so that expired sessions are cleaned up proactively, reducing memory pressure and evictions.

Exam trap

Google Cloud often tests the misconception that persistence (AOF/RDB) frees memory, but persistence only affects durability, not memory usage, and candidates may confuse read replicas as a solution for memory pressure rather than read throughput.

How to eliminate wrong answers

Option B is wrong because monitoring without action does not resolve the high eviction rate, which can degrade session store performance and cause data loss. Option C is wrong because adding a read replica does not increase the primary instance's memory capacity or reduce evictions; replicas are for read scaling and high availability, not for alleviating memory pressure on the primary. Option D is wrong because enabling persistence (AOF or RDB) does not reduce memory usage; it writes data to disk but the dataset still resides in memory, so evictions will continue at the same rate.

796
MCQhard

A BI dashboard query is taking too long because it reads all columns from a large table. The dashboard only needs a few columns. What is the best practice?

A.Create a view that selects specific columns.
B.Create a table with only the needed columns.
C.Use a subquery to filter columns in the FROM clause.
D.Use a LIMIT clause to reduce rows.
AnswerA

Views with column selection allow column pruning.

Why this answer

Creating a view that selects specific columns is the best practice because it allows the BI dashboard to query only the necessary columns without altering the underlying table structure. Views provide a logical abstraction layer, enabling column pruning at the query level while preserving data integrity and access control. This approach reduces I/O and memory consumption by avoiding full table scans on unnecessary columns, directly addressing the performance bottleneck.

Exam trap

Google Cloud often tests the misconception that a subquery or LIMIT can optimize column-level performance, when in fact they only affect row filtering or query structure, not the column scan width.

How to eliminate wrong answers

Option B is wrong because creating a separate table duplicates data, leading to storage overhead, synchronization issues, and potential data staleness; it violates normalization principles and increases maintenance complexity. Option C is wrong because a subquery in the FROM clause does not inherently reduce column reads; the outer query still processes all columns from the subquery unless explicitly pruned, and it may not optimize execution plans as effectively as a view. Option D is wrong because a LIMIT clause restricts rows, not columns; it does not reduce the amount of data read per row, so the query still scans all columns from the large table, failing to address the root cause of slow performance.

797
Multi-Selecthard

Which THREE of the following are best practices for designing BigQuery tables for business intelligence reporting?

Select 3 answers
A.Partition tables by a date or timestamp column used in WHERE clauses.
B.Store data in many small tables to reduce the amount of data scanned per query.
C.Normalize data to reduce data redundancy.
D.Use nested repeated columns to store arrays of related data.
E.Cluster tables on columns that are frequently used in filters or group by clauses.
AnswersA, D, E

Partitioning limits scanned data and reduces costs.

Why this answer

Partitioning tables by a date or timestamp column used in WHERE clauses allows BigQuery to prune partitions, scanning only the relevant data instead of the entire table. This reduces query costs and improves performance, making it a best practice for BI reporting where queries often filter by time ranges.

Exam trap

Google Cloud often tests the misconception that normalization or many small tables are best for BigQuery, when in fact denormalization and larger, partitioned/clustered tables are optimal for BI workloads due to BigQuery's distributed architecture and pricing model.

798
MCQhard

A team uses Traffic Director with Envoy proxies to manage traffic in a service mesh on Compute Engine. They want to introduce fault injection to test resilience by injecting a 5-second delay in 10% of requests to a specific backend service. Which resource should they configure?

A.A forwarding rule with a URL map that includes a fault injection policy
B.A health check policy
C.An HTTP route rule with a fault injection filter
D.A backend service with a fault injection policy in its traffic policy
AnswerC

Traffic Director uses Envoy; fault injection is configured in the HTTP connection manager filter via route rules.

Why this answer

Traffic Director supports HTTP fault filter to inject delays and abort faults into traffic. The filter is configured as part of the routing rule for the backend service.

799
MCQmedium

A Cloud SQL instance is using InnoDB and has a large buffer pool. The query performance is slower after a failover. What is the most likely cause?

A.Read replica lag
B.Buffer pool warm-up time
C.Binary log not enabled
D.Data corruption
AnswerB

The new instance starts with an empty buffer pool, so queries initially incur higher I/O.

Why this answer

After a failover in Cloud SQL, the new primary instance starts with a cold buffer pool. InnoDB relies on the buffer pool to cache data and index pages in memory for fast queries. Since the buffer pool is empty after the failover, queries must read from disk until the cache warms up, causing significantly slower performance.

Exam trap

Google Cloud often tests the misconception that failover performance issues are due to replication lag or binary log settings, when the real cause is the cold buffer pool requiring disk reads until it warms up.

How to eliminate wrong answers

Option A is wrong because read replica lag affects replicas, not the primary instance after a failover; the failover promotes a replica to primary, and lag would have been caught before promotion. Option C is wrong because binary log is used for replication and point-in-time recovery, not for query performance; disabling it would not cause post-failover slowdown. Option D is wrong because data corruption would cause errors or crashes, not a gradual performance degradation; Cloud SQL automatically checks for corruption during failover.

800
MCQmedium

A DevOps team wants to alert when a Compute Engine instance is unreachable for 5 minutes. Which alerting condition type should be used?

A.Metric threshold condition
B.Logs-based alerting
C.Absent condition
D.Forecast condition
AnswerC

Absent condition triggers when a metric (e.g., uptime check) stops reporting.

801
MCQhard

A company has a GKE cluster with cluster autoscaler enabled. They notice that after a batch job completes, the cluster takes a long time to scale down, leaving idle nodes running and incurring costs. Which configuration change would reduce the scale-down delay?

A.Reduce the scale-down delay from 10 minutes to 2 minutes.
B.Enable node auto-provisioning.
C.Increase the min node count to match the peak.
D.Decrease the max node count.
AnswerA

A shorter scale-down delay makes the cluster autoscaler remove unneeded nodes faster.

Why this answer

The cluster autoscaler has a default scale-down delay (e.g., 10 minutes for unneeded nodes). Reducing this delay causes nodes to be removed sooner after becoming idle.

802
MCQmedium

A company stores user events in BigQuery as nested repeated fields. They want to use Looker to build dashboards on individual events. Which SQL pattern should they use in a derived table to flatten the data?

A.SELECT fields FROM table WHERE events IS NOT NULL
B.SELECT fields FROM table, UNNEST(events) AS event
C.SELECT ARRAY_AGG(events) FROM table
D.SELECT events.* FROM table
AnswerB

CROSS JOIN UNNEST flattens the events array into rows, allowing access to event fields.

Why this answer

Option B is correct because UNNEST(events) in BigQuery SQL flattens the nested repeated field 'events' into individual rows, enabling Looker to treat each event as a separate record for dashboarding. This is the standard pattern for denormalizing arrays in BigQuery derived tables, as it converts each array element into its own row while preserving the parent record's fields.

Exam trap

Google Cloud often tests the misconception that simply selecting the nested field (option D) or filtering it (option A) will flatten the data, when in fact only UNNEST (or explicit CROSS JOIN UNNEST) achieves row-level expansion in BigQuery SQL.

How to eliminate wrong answers

Option A is wrong because WHERE events IS NOT NULL does not flatten nested repeated fields; it only filters rows where the entire 'events' array is non-null, leaving the nested structure intact and unusable for per-event analysis. Option C is wrong because ARRAY_AGG(events) does the opposite of flattening—it aggregates rows into an array, which would further nest the data and break the per-event requirement. Option D is wrong because SELECT events.* from table attempts to select all fields from the 'events' record, but without UNNEST, BigQuery treats 'events' as a single array column, causing a syntax error or returning the array as a whole, not individual event rows.

803
MCQmedium

Your application runs on Google Kubernetes Engine (GKE) and emits traces using the OpenTelemetry SDK. You want to export these traces to Cloud Trace. Which configuration is required?

A.Use the Cloud Monitoring API to ingest traces directly.
B.Configure the OpenTelemetry SDK to use the Google Cloud Trace exporter and set the GOOGLE_CLOUD_PROJECT environment variable.
C.Deploy the Cloud Trace agent as a DaemonSet on your GKE cluster.
D.Set up a Pub/Sub topic and subscription to forward traces to Cloud Trace.
AnswerB

This is the standard way to export traces from OpenTelemetry to Cloud Trace.

Why this answer

To export OpenTelemetry traces to Cloud Trace, you need to configure the OpenTelemetry exporter to use the Google Cloud Trace exporter, and set the GCP project ID.

804
Multi-Selecthard

A company is migrating a large Oracle database to Cloud Spanner. The schema includes several tables with foreign key relationships. The team wants to minimize query latency for join queries that always involve a parent table and its children. Which THREE schema design strategies should the team consider? (Choose THREE.)

Select 3 answers
A.Design child table primary keys to start with the parent key (e.g., CustomerId, OrderId)
B.Denormalize frequently joined lookup tables into the parent table as repeated fields
C.Use parent-child interleaved tables where the child table's primary key includes the parent's primary key
D.Create secondary indexes on foreign key columns
E.Store foreign key relationships as JSON arrays in the parent table
AnswersA, B, C

Enables interleaving and efficient queries.

Why this answer

Option A is correct because in Cloud Spanner, designing child table primary keys to start with the parent key (e.g., CustomerId, OrderId) enables efficient key-range scans and reduces the number of splits needed for join queries. This pattern leverages Spanner's distributed architecture to colocate related rows, minimizing cross-node communication and query latency.

Exam trap

Google Cloud often tests the misconception that secondary indexes alone can optimize join performance in distributed databases, but in Spanner, physical colocation via interleaved tables is the key to minimizing query latency for parent-child joins.

805
Multi-Selectmedium

Which THREE are valid Cloud Deploy deployment strategies? (Choose three.)

Select 3 answers
A.Rolling update
B.Blue/Green
C.Shadow
D.Standard
E.Canary
AnswersB, D, E

Blue/Green switches between two environments.

Why this answer

Option B (Blue/Green) is a valid Cloud Deploy deployment strategy because it allows you to run two separate environments (blue and green) and switch traffic between them, enabling instant rollback and zero-downtime deployments. Cloud Deploy natively supports Blue/Green deployments via its Skaffold-based pipeline, where you can define target environments and use load balancer switching to shift traffic. This strategy is particularly useful for critical production services where risk mitigation is paramount.

Exam trap

Cisco often tests the distinction between Cloud Deploy's native strategies and generic Kubernetes deployment methods, so the trap here is that candidates might confuse 'Rolling update' (a Kubernetes-native update method) with a Cloud Deploy strategy, or assume 'Shadow' is a valid strategy due to its use in service mesh testing.

806
MCQeasy

Which of the following is a key benefit of using structured logging in Cloud Logging?

A.It reduces log storage costs by compressing data.
B.It automatically creates log-based metrics from the log entries.
C.It allows logs to be shipped to BigQuery in real-time.
D.It enables automatic parsing of log fields for easier querying and correlation with traces.
AnswerD

Structured logs (JSON) allow Cloud Logging to parse fields automatically.

807
MCQeasy

Refer to the exhibit. What is the most effective optimization for this query?

A.Increase the instance memory to 30 GB
B.Create a composite index on (status, order_date)
C.Remove the WHERE clause and fetch all rows in application
D.Partition the orders table by month
AnswerB

Index allows efficient range scan and filter.

Why this answer

The query filters on `status` and `order_date`, so a composite index on `(status, order_date)` allows the database to perform an index seek on the equality predicate (`status`) and then a range scan on the ordered column (`order_date`), avoiding a full table scan. This is the most effective optimization because it directly supports the WHERE clause with minimal I/O and no sorting overhead.

Exam trap

Google Cloud often tests the misconception that partitioning alone improves query performance, but without a supporting index, partitioning only reduces the scan scope to a subset of partitions and does not eliminate the need for a full scan within those partitions.

How to eliminate wrong answers

Option A is wrong because increasing instance memory to 30 GB does not address the lack of an appropriate index; it may reduce buffer pool misses but cannot eliminate the need for a full table scan on a large table. Option C is wrong because removing the WHERE clause and fetching all rows in the application would transfer massive amounts of data over the network and force client-side filtering, which is far less efficient than letting the database engine use an index. Option D is wrong because partitioning the table by month does not automatically create an index on `status` and `order_date`; while partition pruning might help, without a proper index the query would still scan all rows in the relevant partitions.

808
Multi-Selectmedium

A team is designing a Cloud SQL for PostgreSQL schema for a multi-tenant SaaS application. They need to isolate tenant data while maintaining query performance and manageability. Which two approaches are appropriate? (Choose two.)

Select 2 answers
A.Use separate databases per tenant.
B.Use a single schema with a tenant_id column on every table and row-level security.
C.Use a single table for all tenants with no tenant identifier.
D.Use a separate Cloud SQL instance per tenant.
E.Use separate schemas per tenant.
AnswersB, E

Row-level security enforces tenant isolation while keeping a single schema.

Why this answer

Option B is correct because using a single schema with a tenant_id column and row-level security (RLS) in PostgreSQL allows tenant data isolation at the row level while maintaining a single database and schema. RLS policies automatically filter rows based on the current session's tenant context, ensuring performance is optimized through standard indexing on tenant_id and avoiding the overhead of multiple databases or schemas.

Exam trap

Cisco often tests the misconception that separate databases or instances are required for data isolation, but the trap here is that PostgreSQL's row-level security and schema-based isolation (Option E) are both valid and more manageable at scale than physical separation.

809
MCQmedium

A data analytics team runs ad-hoc queries on BigQuery that often exceed their slot capacity, causing queuing. They want to ensure predictable performance for their critical dashboard while still allowing ad-hoc queries. What is the most cost-effective solution?

A.Create a separate BigQuery reservation for the dashboard with a fixed number of slots, and let ad-hoc queries use on-demand pricing.
B.Switch all queries to on-demand pricing; the dashboard will automatically get priority.
C.Use a single reservation with a baseline of slots for the dashboard (top priority), and allow ad-hoc queries to use idle slots.
D.Move the data to a different BigQuery region with more slot availability.
AnswerC

A baseline guarantees slots for the dashboard, and idle slots are available for ad-hoc queries.

Why this answer

Setting a baseline number of slots for the dashboard guarantees resources, while allowing idle slots to be used by ad-hoc queries. Adding a reservation for only the dashboard with a separate project would waste slots; converting to on-demand is unpredictable; changing the BQ location does not affect slots.

810
MCQeasy

Refer to the exhibit. Given the table definition and two queries, which statement about query performance is correct?

A.Query 1 will scan less data than Query 2 because it uses both partition pruning and clustering.
B.Query 2 will scan less data than Query 1 because it only needs to read one partition.
C.Query 1 will scan the same amount of data as Query 2 because both use partition pruning.
D.Both queries will perform a full table scan because the table is partitioned.
AnswerA

Query 1 filters on partition column and cluster column, enabling both pruning and block elimination.

Why this answer

Query 1 uses both partition pruning (filtering on the partition key `event_date`) and clustering (filtering on the clustering column `user_id`), allowing it to skip irrelevant partitions and scan only the specific rows within the target partition. Query 2 uses only partition pruning on `event_date` but lacks a clustering filter, so it must scan all rows in the partition. Therefore, Query 1 scans less data than Query 2.

Exam trap

Google Cloud often tests the misconception that partition pruning alone is sufficient for optimal performance, ignoring that clustering further reduces data scanned within a partition when filters on clustering columns are present.

How to eliminate wrong answers

Option B is wrong because Query 2 does not scan less data than Query 1; it scans more data within the same partition because it lacks a clustering filter. Option C is wrong because the two queries do not scan the same amount of data; Query 1 benefits from both partition pruning and clustering, reducing the scan further. Option D is wrong because both queries use partition pruning on `event_date`, so they do not perform a full table scan; they only scan the relevant partition(s).

811
MCQeasy

After a major incident, the SRE team conducts a postmortem. Which practice is ESSENTIAL for a blameless culture?

A.Assign action items with owners and due dates.
B.Skip the postmortem if the incident was minor.
C.Identify the person who caused the incident.
D.Focus on systemic failures and contributing factors.
AnswerD

This is the essence of a blameless postmortem: learning from system weaknesses.

Why this answer

Blameless postmortems focus on systemic causes and contributing factors, not individual mistakes. This encourages honest reporting and learning.

812
MCQmedium

You are responsible for a Cloud SQL for MySQL instance that supports a content management system (CMS). The application frequently performs SELECT queries with ORDER BY and LIMIT. Recently, the response time for these queries has increased. The database has 4 vCPUs and 15 GB memory. You check the slow query log and find many queries that are taking over 1 second. The 'rows_examined' is much higher than 'rows_sent'. The EXPLAIN plan shows 'Using filesort' and 'Using temporary'. There is currently an index on the column used in the WHERE clause but not on the ORDER BY columns. The table has 5 million rows. What should you do to improve query performance?

A.Increase the buffer pool size to 80% of memory.
B.Disable the query cache to reduce overhead.
C.Remove the ORDER BY clause and sort the results in application code.
D.Add a composite index on the columns used in the WHERE clause and the ORDER BY clause.
AnswerD

A covering index eliminates sorting and temporary table usage.

Why this answer

Option D is correct because adding a composite index on the columns used in the WHERE clause and the ORDER BY clause allows MySQL to avoid the expensive 'Using filesort' and 'Using temporary' operations. With a covering index, the database can retrieve rows in the required order directly from the index, eliminating the need to sort the result set after filtering. This dramatically reduces 'rows_examined' and improves query response time for SELECT queries with ORDER BY and LIMIT.

Exam trap

Google Cloud often tests the misconception that adding more memory or disabling features like the query cache can solve performance issues, when the real problem is a missing or poorly designed index that forces filesort and temporary tables.

How to eliminate wrong answers

Option A is wrong because increasing the buffer pool size (InnoDB buffer pool) does not address the root cause of filesort and temporary table usage; it only caches more data in memory, which may reduce disk I/O but does not eliminate the sorting overhead. Option B is wrong because disabling the query cache (which is deprecated in MySQL 8.0 and removed in 8.0+) does not affect queries that perform sorting; the query cache is only useful for identical SELECT statements and does not help with ORDER BY performance. Option C is wrong because removing the ORDER BY clause and sorting in application code shifts the sorting burden to the application server, which may still be inefficient and does not reduce the number of rows examined by the database; it also breaks the semantics of the query if the application relies on database-side ordering for pagination or consistency.

813
Multi-Selecthard

Which TWO of the following are valid approaches when troubleshooting a slow BI query in BigQuery that includes a complex JOIN between a large fact table and multiple dimension tables?

Select 2 answers
A.Ensure the fact table is clustered on the join key
B.Split the fact table into multiple smaller tables by region
C.Filter the fact table before the JOIN to reduce the number of rows
D.Move the data to Cloud SQL for faster joins
E.Add indexes on the join columns
AnswersA, C

Clustering improves join efficiency by colocating data.

Why this answer

Option A is correct because clustering on the join key in BigQuery physically co-locates rows with the same key value within the same block, reducing the amount of data scanned during the JOIN. This is especially effective for large fact tables, as it minimizes the need to shuffle data across slots, directly improving query performance.

Exam trap

The trap here is that candidates familiar with traditional databases may assume indexes (Option E) or moving to an OLTP system (Option D) are valid optimizations, but BigQuery's serverless, columnar architecture requires different techniques like clustering and predicate pushdown.

814
Drag & Dropmedium

Arrange the steps to create and connect to a Cloud SQL for PostgreSQL instance using the gcloud command-line tool.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

After creating the instance, you set the password, configure network access, then connect via psql.

815
MCQmedium

An engineer needs to create a build trigger in Cloud Build that runs tests on every pull request to the 'develop' branch. They also want to prevent the build from running if the PR is from a forked repository. What should they do?

A.Create a trigger with pull request event and branch pattern 'develop'
B.Use a separate repository for external contributions
C.Use a Cloud Build filter to ignore fork PRs
D.Add a condition in cloudbuild.yaml to skip if fork
AnswerC

Cloud Build triggers have a checkbox to ignore pull requests from forks.

Why this answer

Cloud Build triggers can be configured to ignore pull requests from forked repositories by setting the 'ignore pull request from forks' option in the trigger configuration.

816
MCQmedium

Your Pub/Sub subscription is not keeping up with the message publishing rate. The subscriber is a Cloud Run service that processes each message in about 2 seconds. You have already increased the number of subscribers to 10. What is the next best step to increase throughput?

A.Enable message ordering to ensure sequential processing.
B.Switch to a pull subscription instead of push.
C.Increase the acknowledgement deadline to 30 seconds.
D.Reduce the flow control max outstanding messages to 100.
AnswerC

With 2-second processing time, a 10-second deadline may cause premature redelivery if there is any delay; increasing it reduces redeliveries and improves throughput.

Why this answer

If increasing subscribers does not help, the issue may be the acknowledgement deadline. If the deadline is too short, messages are redelivered before processing completes, causing duplicates and wasted work. Increasing the deadline (from default 10 seconds to something higher like 30 seconds) gives time to process.

Flow control limits throughput. Ordering keys can reduce throughput.

817
MCQmedium

A team wants to implement a slow burn alert for error budget consumption. Which configuration should they use?

A.Alert on error budget burn rate > 5 over 6 hours
B.Alert on error budget burn rate > 2 over 12 hours
C.Alert on error budget burn rate > 14 over 1 hour
D.Alert on error budget burn rate > 20 over 30 minutes
AnswerA

Correct: slow burn uses longer window and lower threshold.

Why this answer

Slow burn alert uses a 6-hour window and a burn rate threshold of 5 (or similar). This allows detecting gradual budget consumption.

818
MCQmedium

You are running a production workload on Cloud Bigtable and notice that read latency has increased. Upon reviewing the monitoring dashboard, you see that CPU utilization is below 50% but the number of active tablets is high. What is the most likely cause of the increased read latency?

A.Read requests are being throttled due to exceeding IOPS limits.
B.There are too many tablets, causing increased metadata operations and slower reads.
C.A hot node is throttling read requests.
D.The cluster is underprovisioned, causing resource contention.
AnswerB

Excessive tablets increase the overhead of metadata lookups and tablet splitting, leading to higher latency.

Why this answer

In Cloud Bigtable, each tablet is a contiguous range of rows managed by a tablet server. When the number of active tablets is high, the tablet server must perform more metadata operations (e.g., splitting, merging, and serving multiple tablets) which increases per-request overhead and can degrade read latency. This is true even when CPU utilization is below 50%, because the overhead is not purely CPU-bound but involves increased I/O and coordination.

Exam trap

Google Cloud often tests the misconception that high tablet count is always beneficial for parallelism, when in fact it can degrade performance due to metadata overhead, especially when CPU is not the bottleneck.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable does not enforce a hard IOPS limit; it scales with the number of nodes, and throttling would typically manifest as increased error rates or retries, not simply increased latency with low CPU. Option C is wrong because a hot node would cause high CPU utilization on that node, not low overall CPU, and throttling would be localized to that node's requests. Option D is wrong because underprovisioning would lead to high CPU utilization and resource contention across the cluster, not low CPU with a high tablet count.

819
Multi-Selectmedium

A company plans to migrate an on-premises MySQL database to Cloud SQL. Which THREE steps should they include in their migration plan?

Select 3 answers
A.Test application compatibility with Cloud SQL.
B.Connect to Cloud SQL via Database Migration Service.
C.Convert all stored procedures to PostgreSQL dialect.
D.Determine whether to use private or public IP.
E.Enable point-in-time recovery before migration.
AnswersA, B, D

Ensure the application works with Cloud SQL's MySQL version and configuration to avoid surprises.

Why this answer

Option A is correct because testing application compatibility with Cloud SQL ensures that any MySQL-specific features, configurations, or behaviors used by the application are supported in the Cloud SQL environment. This step is critical to identify potential issues early, such as unsupported storage engines, character set differences, or version-specific SQL syntax, before committing to the full migration.

Exam trap

The trap here is that candidates may confuse the need to convert stored procedures when migrating between different database engines (e.g., MySQL to PostgreSQL) with a homogeneous MySQL-to-Cloud SQL migration, where no dialect conversion is required.

820
Multi-Selectmedium

A company wants to deploy a microservice to Google Cloud. They require canary deployments with automatic rollback if error rate increases. Which TWO services should they use together?

Select 2 answers
A.Cloud Build
B.Cloud Endpoints
C.Cloud Functions
D.Cloud Deploy
E.Cloud Run
AnswersD, E

Cloud Deploy provides canary strategies with automated rollback based on metrics.

821
MCQhard

A CI/CD pipeline uses Cloud Build to build a Docker image. The Dockerfile copies dependencies from a private repository in the same VPC. The build takes a long time due to repeated downloads. How can the engineer optimize the build?

A.Use a larger machine type
B.Increase the build timeout
C.Enable Kaniko layer caching and push cache to Artifact Registry
D.Use Cloud Build's local SSD for temporary storage
AnswerC

Kaniko layer caching stores layer cache in a remote registry, speeding up builds.

Why this answer

Option C is correct because Kaniko layer caching stores intermediate Docker image layers in Artifact Registry, allowing subsequent builds to reuse cached layers instead of re-downloading dependencies from the private repository. This directly addresses the repeated downloads causing long build times, as Kaniko checks the cache before executing each RUN command in the Dockerfile.

Exam trap

The trap here is that candidates confuse increasing resources (machine type or timeout) with optimizing the build process, failing to recognize that caching is the correct approach to eliminate redundant downloads.

How to eliminate wrong answers

Option A is wrong because using a larger machine type increases CPU and memory but does not reduce the time spent downloading dependencies; the bottleneck is network I/O, not compute resources. Option B is wrong because increasing the build timeout only extends the maximum allowed duration for the build to complete, it does not optimize the build process or reduce download time. Option D is wrong because Cloud Build's local SSD provides ephemeral storage for build artifacts but does not cache Docker layers across builds; dependencies would still be downloaded fresh each time.

822
MCQeasy

What is the purpose of a Google Cloud organization node in the resource hierarchy?

A.It is used to group billing accounts.
B.It is the root node in the GCP resource hierarchy for centralized policy and billing management.
C.It is an alias for a project.
D.It represents a team within a company.
AnswerB

Correct definition.

Why this answer

The organization node is the root resource. It allows centralized management of policies, roles, and billing across all folders and projects. It is required for organization-level IAM and organization policies.

823
Multi-Selecthard

An engineer is configuring a Cloud Build build pool to connect to resources in a VPC network. They need to ensure the build can access a private Artifact Registry repository. Which three steps should they take?

Select 3 answers
A.Set up Private Service Connect for Artifact Registry
B.Enable public access on the Artifact Registry repository
C.Create a private build pool with the 'network' field set to the VPC network
D.Configure a Cloud NAT gateway for the VPC
E.Grant the Cloud Build service account the 'Artifact Registry Reader' role
AnswersA, C, E

Artifact Registry uses Private Service Connect to expose a private endpoint in the VPC.

Why this answer

Private pools allow builds to use a VPC network. To access private Artifact Registry, the pool must be in the same VPC as the registry endpoint (which uses Private Service Connect or VPC peering), and the service account must have permission to read from the registry.

824
MCQmedium

A retail company uses Cloud SQL for PostgreSQL for inventory management. The schema has a table 'inventory' with columns: product_id, warehouse_id, quantity, last_updated. The table contains over 100 million rows. The application frequently runs aggregate queries to compute total quantity of a product across all warehouses (e.g., SELECT SUM(quantity) FROM inventory WHERE product_id = ?). These queries are slow, taking tens of seconds. The team tries a covering index on (product_id, quantity) but sees little improvement because they still need to scan many rows. They need to redesign the schema to improve aggregation performance. What is the best approach?

A.Add a covering index on (product_id, quantity).
B.Migrate the inventory table to Cloud Spanner and use interleaved indexes.
C.Use BigQuery as a read replica and query there.
D.Create a summary table 'product_totals' with columns product_id and total_quantity, and use triggers to keep it updated on INSERT/UPDATE/DELETE in inventory.
AnswerD

Pre-aggregation reduces the amount of work needed at query time.

Why this answer

Option A is correct. Creating a summary table that pre-aggregates totals per product, updated via triggers on the inventory table, dramatically speeds up the aggregate queries. Option B (covering index) helps but still requires scanning many rows.

Option C (Spanner) is a migration to a different database. Option D (BigQuery) is external and not a schema change.

825
Multi-Selectmedium

A company is migrating an on-premises PostgreSQL database to Cloud SQL. They need to minimize downtime during migration. Which TWO steps should they take?

Select 2 answers
A.Set up a read replica for switchover
B.Use pg_dump and restore
C.Enable automatic backups
D.Configure a high-availability instance
E.Use Database Migration Service with continuous replication
AnswersA, E

Correct: A read replica can be promoted to primary with minimal downtime, enabling a quick cutover.

Why this answer

Option A (Database Migration Service with continuous replication) minimizes downtime by syncing changes in real time. Option C (Set up a read replica) allows a near-instantaneous cutover by promoting the replica. Option B (automatic backups) does not reduce downtime.

Option D (pg_dump) involves downtime. Option E (HA instance) is for post-migration availability, not migration steps.

Page 10

Page 11 of 14

Page 12
Google Professional Cloud Database Engineer PCDE Questions 751–825 | Page 11/14 | Courseiva