Courseiva

Google Professional Cloud Database Engineer (PCDE) — Questions 826900

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

Page 11

Page 12 of 20

Page 13
826
MCQeasy

A Cloud Memorystore for Redis instance is running out of memory. The team wants to automatically remove the least recently used keys when memory is full. Which eviction policy should they configure?

A.volatile-lru
B.volatile-ttl
C.noeviction
D.allkeys-lru
AnswerD

Evicts least recently used keys from all keys.

Why this answer

The `allkeys-lru` eviction policy is correct because it applies the LRU (Least Recently Used) algorithm to all keys in the Redis instance, not just those with an expiry set. This ensures that when memory is full, the least recently accessed keys are automatically removed, regardless of whether they have a TTL, which directly meets the requirement to free memory without manual intervention.

Exam trap

A common pitfall is confusing volatile-lru (only keys with TTL) with allkeys-lru (all keys), leading candidates to choose volatile-lru when the requirement is to consider all keys.

How to eliminate wrong answers

Option A is wrong because `volatile-lru` only evicts keys that have an expiry (TTL) set, leaving keys without expiry untouched, which may not free enough memory if the majority of keys are persistent. Option B is wrong because `volatile-ttl` evicts keys with the shortest remaining TTL first, which is not based on access patterns and may remove frequently used keys that happen to have a short TTL. Option C is wrong because `noeviction` prevents any eviction and instead returns errors on write operations when memory is full, which does not automatically remove any keys and can cause application failures.

827
Multi-Selectmedium

A company is using Cloud Bigtable and wants to set up monitoring and alerting for replication lag between clusters. Which TWO metrics should they use? (Choose 2)

Select 2 answers
A.cloudbigtable.googleapis.com/cluster/disk_usage
B.cloudbigtable.googleapis.com/cluster/replication_lag
C.cloudbigtable.googleapis.com/cluster/cpu_load
D.cloudbigtable.googleapis.com/cluster/replication_delay
E.cloudbigtable.googleapis.com/cluster/operations_count
AnswersB, D

Correct. This metric shows the lag in operations.

Why this answer

`replication_lag` directly measures the time difference between the primary cluster and a replica cluster in Cloud Bigtable, which is the key metric for monitoring replication delay. Option D is also correct because `replication_delay` is another metric that tracks the same concept, often reported in seconds, and is used to alert when replicas fall behind. Both metrics are essential for ensuring data consistency and timely failover in multi-cluster Bigtable deployments.

Exam trap

Google Cloud often tests the distinction between `replication_lag` and `replication_delay` as two separate but valid metrics, while candidates may mistakenly think only one is correct or confuse them with cluster health metrics like CPU or disk usage.

828
Multi-Selectmedium

A team wants to reduce toil in their operations. Which two of the following are characteristics of toil according to Google SRE principles? (Choose 2)

Select 2 answers
A.Work that provides enduring value for the service
B.Work that is manual and repetitive
C.Work that scales linearly with service growth
D.Work that is completely automated already
E.Work that requires creative problem-solving
AnswersB, C

Toil is manual and repetitive.

Why this answer

Toil is manual, repetitive, automatable, devoid of enduring value, and scales linearly with service growth. Work that is creative or strategic is not toil. Tasks that require deep analysis are not toil.

829
MCQmedium

A database engineer is configuring a Memorystore for Redis instance for a session store application. The application requires persistent storage to survive node failures. Which tier and configuration should be used?

A.Standard tier with AOF persistence enabled
B.Standard tier with no persistence
C.Basic tier with RDB persistence enabled
D.Basic tier with AOF persistence enabled
AnswerA

Standard tier provides replication and failover; AOF persistence saves data to disk.

Why this answer

The Standard tier in Memorystore for Redis provides a replicated architecture with a primary and read replica, ensuring high availability and automatic failover. Enabling AOF (Append-Only File) persistence writes every write operation to an AOF file, which is stored on persistent disk and can be replayed to restore data after a node failure. This combination meets the session store requirement for data durability across failures, as the Basic tier lacks replication and cannot guarantee data survival.

Exam trap

Google Cloud often tests the misconception that enabling persistence on any tier is sufficient, but the trap here is that the Basic tier lacks replication and automatic failover, so even with AOF persistence, a node failure causes downtime and potential data loss, which is unacceptable for a session store requiring high availability.

How to eliminate wrong answers

Option B is wrong because Standard tier with no persistence does not save data to disk, so any node failure or restart results in complete data loss, failing the persistent storage requirement. Option C is wrong because Basic tier with RDB persistence uses point-in-time snapshots that can lose data between snapshots, and the Basic tier has no replication, so a node failure causes downtime and potential data loss. Option D is wrong because Basic tier with AOF persistence still lacks replication, meaning if the single node fails, the AOF file may be unrecoverable or the instance is unavailable, violating the need for session store durability.

830
MCQmedium

An organization is migrating a Teradata data warehouse to BigQuery. They need to convert existing Teradata DDL and BTEQ scripts to BigQuery SQL. Which Google Cloud service should they use for schema conversion?

A.Cloud Data Fusion
B.Cloud Composer
C.BigQuery Data Transfer Service
D.Schema Conversion Tool (SCT)
AnswerD

SCT is designed for heterogeneous schema conversion, including Teradata to BigQuery.

Why this answer

Schema Conversion Tool (SCT) (now part of Database Migration Service) converts DDL and scripts from sources like Teradata to BigQuery. BigQuery Data Transfer Service handles data loading, not schema conversion.

831
Drag & Dropmedium

Order the steps to export data from Cloud Bigtable to Cloud Storage using Dataflow.

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

First create storage, then set up Dataflow job with template, configure, run, verify.

832
MCQeasy

A developer wants to manually promote a release from a staging target to a production target using Cloud Deploy. Which gcloud command should they use?

A.gcloud deploy releases promote
B.gcloud deploy releases approve
C.gcloud deploy rollouts create
D.gcloud deploy targets promote
AnswerA

This command promotes a release to the next target.

Why this answer

The `gcloud deploy releases promote` command is the correct choice because Cloud Deploy uses a promotion-based model where releases are advanced through targets (e.g., staging to production) via a promote action. This command triggers the creation of a new rollout in the next target in the promotion sequence, effectively moving the release forward without manual rollout creation.

Exam trap

The trap here is that candidates confuse the promotion action with the approval action or think they need to manually create a rollout, when in fact `promote` is the dedicated command for advancing a release through the pipeline's target sequence.

How to eliminate wrong answers

Option B is wrong because `gcloud deploy releases approve` is used to approve a pending rollout, not to promote a release to the next target; promotion and approval are separate lifecycle stages. Option C is wrong because `gcloud deploy rollouts create` manually creates a rollout for a specific release and target, bypassing the automated promotion pipeline and requiring explicit target specification, which is not the intended manual promotion workflow. Option D is wrong because `gcloud deploy targets promote` is not a valid gcloud command; Cloud Deploy does not support promoting targets directly—promotion is always release-centric.

833
MCQhard

Refer to the exhibit. What is the most likely performance issue with this schema?

A.No performance issue; the schema is optimal
B.Hotspotting on UserId due to frequent queries
C.Hotspotting on TransactionId due to monotonically increasing values
D.Too many secondary indexes causing write amplification
AnswerC

Monotonically increasing keys cause all writes to target a single split.

Why this answer

The schema uses TransactionId as the partition key with monotonically increasing values (e.g., timestamps or auto-incrementing integers). In a distributed database like Cloud Spanner or Bigtable, this causes all writes to land on a single partition, creating a hotspot that throttles throughput and increases latency. The correct answer is C because this hotspotting is the most likely performance issue.

Exam trap

The trap is the assumption that any unique identifier works as a partition key. Google Cloud exams test that monotonically increasing values (e.g., timestamps) as partition keys create hotspotting in distributed databases like Spanner or Bigtable, limiting write scalability.

How to eliminate wrong answers

Option A is wrong because the schema has a clear hotspotting problem, so it is not optimal. Option B is wrong because UserId is not the partition key; even if queried frequently, hotspotting on UserId would require it to be the partition key with skewed access patterns, which is not indicated. Option D is wrong because the exhibit does not show multiple secondary indexes; write amplification from secondary indexes is a concern only when many indexes exist, and the primary issue here is partition-level hotspotting from the monotonically increasing partition key.

834
Multi-Selectmedium

A company is designing a disaster recovery plan for Cloud SQL for MySQL. They need to ensure the database can be recovered with minimal data loss (RPO of minutes) in case of a regional outage. Which TWO actions should they take?

Select 2 answers
A.Create a cross-region read replica
B.Set up a same-region read replica
C.Enable binary logging with a PITR retention period
D.Enable automatic storage increase
E.Configure automated daily backups
AnswersA, C

A cross-region replica provides near-real-time data in another region for failover.

Why this answer

To achieve low RPO across regions, enable binary logging for PITR and configure a cross-region replica. Automated backups alone have a RPO of up to 24 hours.

835
MCQmedium

A team uses Cloud Build to deploy a Python service to Cloud Run. They need to ensure the service uses a custom domain and only accepts HTTPS traffic. Which flags should they include in the gcloud run deploy command?

A.--ingress=internal --platform=managed
B.--ingress=all --allow-unauthenticated
C.--ingress=all --no-allow-unauthenticated
D.No flags related to custom domain; use gcloud beta run domain-mappings create separately
AnswerD

Custom domain is configured via domain mappings, not a deploy flag. HTTPS is default for Cloud Run.

Why this answer

The `gcloud run deploy` command does not include flags for mapping a custom domain. Custom domain mapping is a separate step that must be performed using the `gcloud beta run domain-mappings create` command (or via the Cloud Run console). The `--ingress` flag controls traffic routing (e.g., all, internal, internal-and-cloud-load-balancing), not domain configuration, and HTTPS is enforced by default on Cloud Run services.

Exam trap

The trap here is that candidates assume the `--ingress` flag or authentication flags can also configure custom domains, when in fact domain mapping is a separate, prerequisite step that must be completed before the service responds on the custom domain.

How to eliminate wrong answers

Option A is wrong because `--ingress=internal` restricts traffic to internal sources (VPC or Cloud Run internal), which does not allow public HTTPS traffic and does not address custom domain mapping. Option B is wrong because `--ingress=all` allows all traffic, but `--allow-unauthenticated` permits unauthenticated invocations, which is unrelated to custom domain or HTTPS enforcement. Option C is wrong because `--ingress=all` and `--no-allow-unauthenticated` control ingress and authentication, respectively, but neither flag maps a custom domain or enforces HTTPS-only; HTTPS is already default on Cloud Run.

836
Multi-Selecthard

A team is managing a Memorystore for Redis instance that needs to scale to handle increased traffic. They want to ensure high availability and the ability to distribute data across multiple nodes. Which three actions should they take? (Choose THREE.)

Select 3 answers
A.Use Cloud Storage snapshots for persistence
B.Enable Redis Cluster on the instance to shard data across multiple nodes
C.Upgrade the instance to a higher memory size by changing the tier
D.Create a read replica in a different zone for high availability
E.Enable AOF persistence
AnswersB, C, D

Redis Cluster provides horizontal scaling and sharding.

Why this answer

Memorystore for Redis offers vertical scaling (changing tier) and horizontal scaling via Redis Cluster (enabling clustering). For HA, they can create a standard tier instance with replication (a read replica).

837
MCQeasy

An SRE team uses Cloud Monitoring to alert on error budget burn rate. They configure a slow burn alert with a 6-hour lookback window and a burn rate factor of 5. What is the purpose of this slow burn alert?

A.To detect a gradual increase in error rate that could exhaust budget over time
B.To trigger when error budget is completely exhausted
C.To detect rapid spikes in error rate that could exhaust budget quickly
D.To calculate the remaining error budget
AnswerA

Slow burn alerts with longer windows catch sustained moderate error rates.

Why this answer

Slow burn alerts detect sustained, slower consumption of error budget that could still exhaust the budget before the SLO period ends. They give early warning for gradual degradation.

838
MCQhard

An SRE team uses Cloud Monitoring SLOs with request-based SLI for a microservice. They want to alert when the error budget is projected to be exhausted within 2 hours at current burn rate. The SLO target is 99.9% over 30 days. Which approach should they use?

A.Configure a slow burn rate alert with 6-hour window and 5x burn rate
B.Configure a fast burn rate alert with 1-hour window and 14x burn rate
C.Set an alert on the error budget remaining metric when it drops below 0.1%
D.Create a custom alert policy with a 1-hour window and burn rate multiplier of 360
AnswerD

A burn rate of 360x over 1 hour projects exhaustion in 2 hours (30 days * 24 / 360 = 2 hours).

Why this answer

The fastest burn rate that exhausts the budget in 2 hours is (30 days * 24 hours)/2 hours = 360x. But fast burn alerts use a 1-hour window and 14x burn rate. However, the requirement is to alert when exhaustion is projected within 2 hours.

A multi-burn-rate alert with fast (1h, 14x) and slow (6h, 5x) is standard. But to get a 2-hour projection, you need a medium burn rate alert. Cloud Monitoring SLO alerts support custom lookback windows and burn rates.

The correct approach is to create a custom alert with a lookback window of, say, 1 hour and a burn rate multiplier of 360 (but that's impractical). Actually, the standard practice is to use a multi-window alert: fast (1h, 14x) and slow (6h, 5x). The fast burn rate of 14x exhausts budget in 30 days/14 ≈ 2.14 days, not 2 hours.

So for 2-hour exhaustion, you need a burn rate of 360x. That would require a very short window (e.g., 5 minutes). The best option is to use the 'error budget burn rate' alert with a custom lookback window of 1 hour and burn rate > 360, but that is not a standard dropdown.

However, Cloud Monitoring allows you to configure a custom alert policy with a burn rate condition. The correct answer is to use a custom alert with a 1-hour window and burn rate multiplier of 360. But among the options, the one that says 'Create a custom alert with a 1-hour window and burn rate multiplier of 360' is correct.

If not available, the next best is to use multi-window alerts. Let's assume one option mentions custom burn rate. Since I control options, I'll make that the correct one.

839
MCQmedium

A team wants to implement GitOps for their Terraform infrastructure. They want to automatically apply changes when a pull request is merged to the main branch. Which approach should they use?

A.Use Cloud Source Repositories with a webhook to a Compute Engine instance that runs Terraform
B.Set up a cron job that runs `terraform apply` every hour
C.Use Cloud Build with a trigger on push to main branch to run `terraform apply`
D.Use Terraform Cloud with VCS integration
AnswerC

Cloud Build can be configured to run Terraform on branch merge, implementing GitOps.

Why this answer

GitOps involves using a tool like Cloud Build with a trigger that runs Terraform on merge to main. Cloud Build can execute Terraform commands and apply changes.

840
MCQmedium

An engineer wants to deploy a set of GCP resources (e.g., Cloud SQL, Pub/Sub topics) alongside their Kubernetes workloads using a GitOps approach with Config Connector. What is the primary benefit of using Config Connector over deploying these resources manually?

A.It automatically scales GCP resources based on load.
B.It provides a graphical UI for managing GCP resources.
C.It allows managing GCP resources using Kubernetes-style YAML, enabling version control and CI/CD for infrastructure.
D.It reduces the cost of GCP resources by using committed use discounts.
AnswerC

This is the key benefit: GitOps for GCP resources.

Why this answer

Config Connector allows you to manage GCP resources (e.g., Cloud SQL, Pub/Sub topics) using Kubernetes-style YAML manifests. This enables GitOps workflows where infrastructure definitions are stored in a Git repository, version-controlled, and automatically applied via CI/CD pipelines, ensuring consistency and auditability.

Exam trap

The trap here is that candidates may confuse Config Connector with a scaling or cost-saving tool, when its core value is infrastructure-as-code integration with Kubernetes-native GitOps workflows.

How to eliminate wrong answers

Option A is wrong because Config Connector does not automatically scale GCP resources based on load; scaling is handled by separate GCP services like autoscalers or Cloud SQL's automatic storage increase. Option B is wrong because Config Connector is a Kubernetes controller that uses YAML manifests, not a graphical UI; the GCP Console provides the UI. Option D is wrong because Config Connector does not reduce costs via committed use discounts; those are contractual commitments made directly through the GCP billing console or API, independent of the deployment tool.

841
MCQhard

Your team is migrating a 5 TB MySQL database from on-premises to Cloud SQL. The database receives 2,000 writes per second and the network link has 500 Mbps bandwidth. You need to minimize migration time with zero data loss. What should you do?

A.Configure Database Migration Service with a connectivity test and start continuous replication.
B.Export the database using mysqldump and import into Cloud SQL using the console.
C.Use gcloud sql import with a compressed CSV export from on-premises.
D.Set up a VPN, then use mysqldump with --master-data and pipe to mysql on Cloud SQL.
AnswerA

DMS supports continuous migration with minimal downtime.

Why this answer

Database Migration Service (DMS) with continuous replication is the correct choice because it supports live migration with minimal downtime and zero data loss for large databases like 5 TB. DMS uses MySQL binlog-based replication to synchronize changes from the on-premises source to Cloud SQL while the source remains operational, then performs a cutover with only seconds of downtime. This approach handles the 2,000 writes/second load and 500 Mbps bandwidth efficiently by streaming incremental changes rather than transferring the entire 5 TB in one shot.

Exam trap

Google Cloud often tests the misconception that a one-time dump and import (mysqldump or CSV) is sufficient for large databases with continuous writes, ignoring the requirement for zero data loss and minimal downtime that only continuous replication can satisfy.

How to eliminate wrong answers

Option B is wrong because mysqldump export and console import is a one-time dump that requires the source database to be read-locked or stopped to ensure consistency, causing significant downtime, and transferring 5 TB over 500 Mbps would take over 22 hours, during which writes would be lost. Option C is wrong because gcloud sql import with a compressed CSV export is designed for smaller, structured data imports and does not support continuous replication; it also requires converting the MySQL database to CSV format, which is impractical for a 5 TB database with schema complexity and risks data loss during conversion. Option D is wrong because piping mysqldump with --master-data directly to Cloud SQL via VPN still performs a one-time dump and import, which requires stopping writes on the source to capture a consistent snapshot, leading to downtime and potential data loss if writes continue during the transfer.

842
MCQhard

A team runs a service on Google Kubernetes Engine (GKE) and wants to inject faults to test resilience. They need to introduce latency into requests to a specific microservice without modifying code. Which tool should they use?

A.Cloud Endpoints
B.Cloud Armor
C.Cloud Load Balancing
D.Traffic Director with HTTP fault filter
AnswerD

Traffic Director can inject faults for services using its traffic management.

Why this answer

Traffic Director can inject faults via HTTP fault filter for services using Istio or Traffic Director. Chaos Mesh on GKE can inject faults at the pod level. Since the requirement is to inject latency into requests between services without code changes, a service mesh with fault injection (like Istio with VirtualService) is ideal.

Traffic Director supports fault injection via HTTP filters. Chaos Mesh can also inject latency by sidecar. Both are valid, but Traffic Director is specifically for traffic management.

The question likely expects Traffic Director or Istio. Since Traffic Director is a GCP service, it might be the preferred answer. However, Chaos Mesh is also a common choice.

I'll choose Traffic Director as it's integrated.

843
MCQmedium

A company plans to migrate a MySQL database to Cloud SQL with minimal downtime. They use Database Migration Service with continuous CDC. After starting the migration, the initial full dump completes, and CDC replication begins. The application team needs to cut over during a maintenance window. What must the engineer do just before promoting the destination to ensure no data loss?

A.Quiesce writes to the source, confirm replication lag is zero, then promote the destination.
B.Promote the destination immediately; replication lag is automatically handled.
C.Take a manual snapshot of the source with mysqldump and import it to the destination.
D.Stop the migration job and delete the source database.
AnswerA

This is the correct procedure: stop writes, verify zero lag, then promote to cutover cleanly.

Why this answer

Before promoting the destination, the engineer must verify that the replication lag is zero, meaning all changes from the source have been applied to the destination. This ensures no data loss during cutover. After confirming zero lag, the source should be quiesced (writes stopped) to prevent further changes, then the destination can be promoted.

844
MCQeasy

Which of the following best describes 'toil' in SRE?

A.Work that is creative and requires deep domain knowledge
B.Automating infrastructure provisioning
C.Incident response and on-call duties
D.Manual, repetitive work that provides no enduring value and scales linearly with service growth
AnswerD

Correct description of toil.

Why this answer

Toil is work that is manual, repetitive, automatable, and does not provide enduring value. It scales with service growth.

845
MCQeasy

A startup needs a fully managed relational database for their e-commerce platform with high availability, automatic failover, and read replicas. They expect moderate traffic and want to minimize operational overhead. Which Google Cloud service should they use?

A.Cloud SQL
B.Cloud Spanner
C.Firestore
D.Bigtable
AnswerA

Cloud SQL provides managed relational databases with HA and replicas.

Why this answer

Cloud SQL offers fully managed MySQL, PostgreSQL, and SQL Server with high availability and read replicas. It is the best fit for moderate-traffic OLTP workloads.

846
MCQeasy

A company is migrating an on-premises MySQL database to Cloud SQL for MySQL. The current schema uses InnoDB with foreign keys. What is a key consideration for maintaining referential integrity in Cloud SQL?

A.Enable the foreign_key_checks flag during migration.
B.Convert foreign keys to application-level checks.
C.Use Cloud SQL's built-in foreign key enforcement which is identical to on-premises.
D.Foreign keys are not supported in Cloud SQL MySQL.
AnswerC

Cloud SQL for MySQL behaves exactly like standard MySQL for foreign keys.

Why this answer

Cloud SQL for MySQL uses the same MySQL database engine as on-premises, including full support for InnoDB foreign key constraints. When you migrate the schema, Cloud SQL enforces referential integrity identically to a self-managed MySQL instance, so no changes to foreign key definitions are required.

Exam trap

The trap here is that candidates assume managed cloud databases have limited SQL features, leading them to incorrectly choose Option D, when in fact Cloud SQL for MySQL provides identical foreign key support to on-premises MySQL.

How to eliminate wrong answers

Option A is wrong because enabling the foreign_key_checks flag during migration would actually disable foreign key enforcement, risking data integrity violations; the flag should be enabled after migration to ensure referential integrity. Option B is wrong because converting foreign keys to application-level checks is unnecessary and introduces complexity and potential inconsistency, as Cloud SQL fully supports native foreign key enforcement. Option D is wrong because Cloud SQL for MySQL does support foreign keys; this is a common misconception that stems from confusion with other managed database services like Cloud SQL for PostgreSQL or Spanner.

847
MCQhard

You administer a Cloud SQL for PostgreSQL instance running with 4 vCPUs and 15 GB of memory. The application frequently runs complex read-only reporting queries during business hours. Recently, the database started throwing 'out of memory' errors, and the instance's memory usage is consistently above 90%. You have enabled the pgtune recommendations and applied them. The workload is read-heavy and does not require a high write throughput. Which change would most effectively reduce memory pressure while maintaining query performance?

A.Enable the pgzstd extension to compress data in memory.
B.Set up connection pooling using PgBouncer to limit the number of concurrent connections.
C.Scale up the instance to a higher memory tier, such as 8 vCPUs and 30 GB of memory.
D.Decrease the shared_buffers configuration parameter to free memory for other uses.
AnswerC

More memory will accommodate the reporting queries' work_mem and cache needs, reducing out-of-memory errors.

Why this answer

Scaling up the instance to a higher memory tier (8 vCPUs, 30 GB) directly increases available memory, addressing the 'out of memory' errors and high memory usage while maintaining read performance. Option A (pgzstd compression) does not significantly reduce memory consumption; it helps with storage or network I/O. Option B (PgBouncer) reduces memory per connection but does not reduce overall memory needs when the database itself requires more memory for caching and operations.

Option D (decreasing shared_buffers) sacrifices cache performance, likely slowing queries, and may not free enough memory to resolve the issue.

848
MCQmedium

A company is migrating an Oracle database to Cloud SQL for PostgreSQL. They have a table with a column defined as NUMBER(10,2). To maintain data integrity, what should be the corresponding PostgreSQL data type?

A.FLOAT
B.NUMERIC(10,2)
C.INTEGER
D.DECIMAL(10,0)
AnswerB

NUMERIC(10,2) matches the precision and scale of NUMBER(10,2).

Why this answer

NUMBER(10,2) represents a decimal number with 10 digits total and 2 after decimal; NUMERIC(10,2) is the equivalent in PostgreSQL.

849
MCQmedium

A Cloud Bigtable instance stores time-series data with a row key format: [metric_id]#[timestamp]. The team notices read throughput is low when scanning a metric over a time range. What is the likely cause?

A.All rows for a given metric are stored in a single tablet causing a hotspot.
B.Too many column families in the schema.
C.The number of nodes is insufficient.
D.Replication factor is set too low.
AnswerA

With metric_id prefix, all rows for that metric are on one tablet, limiting read throughput.

Why this answer

The row key format [metric_id]#[timestamp] causes all rows for the same metric_id to share the same lexicographic prefix. Cloud Bigtable stores rows in sorted order by row key, so all rows for a given metric are co-located in a single tablet. When scanning a time range for that metric, all read requests hit the same tablet, creating a hotspot that limits throughput to the capacity of a single node.

Exam trap

Google often tests the misconception that adding more nodes or increasing replication will solve a hotspot issue, but the root cause is a poorly designed row key that prevents even data distribution across tablets.

How to eliminate wrong answers

Option B is wrong because column families do not affect read throughput for range scans; they affect storage and write performance, and Cloud Bigtable supports up to a few hundred column families without performance degradation. Option C is wrong because insufficient nodes would cause overall throughput issues across all operations, not specifically low read throughput for a single metric's time-range scan; the hotspot is a data distribution problem, not a capacity problem. Option D is wrong because replication factor is not a configurable parameter in Cloud Bigtable; it uses a single cluster with automatic replication within the cluster, and replication does not affect read throughput for range scans.

850
MCQmedium

You have a Cloud Spanner database that needs to be migrated from one region to another. You want to ensure no data loss and minimal downtime. Which approach should you use?

A.Use gcloud spanner instances move to change the region of the existing instance.
B.Create a backup of the database and restore it to a new instance in the target region.
C.Create a read replica in the target region and promote it after replication catches up.
D.Use gcloud command 'gcloud spanner databases export' to export the database to CSV files, then import into the new instance.
AnswerB

Backup/restore is the recommended method for moving a Spanner database between regions.

Why this answer

Cloud Spanner does not support in-place region changes or read replicas in different regions. The only supported method to migrate a Cloud Spanner database between regions with no data loss and minimal downtime is to create a backup of the database and restore it to a new instance in the target region. This approach ensures a consistent snapshot of the data and allows you to plan the cutover window to minimize downtime.

Exam trap

Google often tests the misconception that Cloud Spanner supports cross-region read replicas like other databases (e.g., Cloud SQL or MySQL), but Spanner's architecture uses a single regional or multi-region instance configuration with synchronous replication, not promotable replicas.

How to eliminate wrong answers

Option A is wrong because the `gcloud spanner instances move` command does not exist; Cloud Spanner instances cannot have their region changed after creation. Option C is wrong because Cloud Spanner does not support cross-region read replicas that can be promoted; replicas in Spanner are always part of the same instance and region configuration. Option D is wrong because exporting to CSV files using `gcloud spanner databases export` is not supported; Cloud Spanner only supports export to Avro format, and importing from CSV would require custom tooling and would not guarantee consistency or minimal downtime.

851
MCQhard

A financial services company uses Cloud Spanner for transaction processing. They need to run analytical queries that scan large portions of the database without impacting OLTP performance. What schema design technique should they use?

A.Export data periodically to BigQuery and run queries there.
B.Create multiple secondary indexes on frequently scanned columns.
C.Design the primary key so that analytical queries scan a small number of tablets by using interleaved tables.
D.Use a read replica instance to offload analytical queries.
AnswerC

Interleaving related rows keeps them co-located, allowing efficient scans on parent-child relationships without distributed reads.

Why this answer

Interleaved tables in Cloud Spanner physically co-locate parent and child rows on the same tablet (split). This ensures that analytical queries scanning a large portion of the database can be served by a small number of tablets, minimizing cross-tablet reads and reducing contention with OLTP traffic. By designing the primary key to leverage interleaving, you keep analytical scans localized and avoid the performance penalty of scattering reads across many tablets.

Exam trap

A common misconception is that read replicas or secondary indexes are the primary way to isolate analytical workloads, but in Cloud Spanner the correct schema-level isolation technique is interleaved tables to minimize tablet scans and avoid cross-split contention.

How to eliminate wrong answers

Option A is wrong because exporting data to BigQuery is an operational workaround, not a schema design technique; it introduces latency, data staleness, and additional ETL overhead, whereas the question asks for a schema design technique. Option B is wrong because creating multiple secondary indexes on frequently scanned columns does not reduce the number of tablets scanned; secondary indexes are stored separately and can actually increase write amplification and contention during OLTP writes. Option D is wrong because Cloud Spanner does not support read replica instances in the traditional sense; Spanner uses a single global instance with automatic replication, and offloading queries to a read replica is not a schema design technique and would not prevent impact on OLTP performance due to shared underlying storage.

852
MCQeasy

A marketing team needs to analyze customer behavior using BigQuery. They want to create a table that stores the first and last purchase date for each customer from the `orders` table. Which SQL approach should they use?

A.SELECT customer_id, (SELECT order_date FROM orders ORDER BY order_date LIMIT 1) AS first_purchase, ...
B.SELECT o1.customer_id, o1.order_date AS first_purchase, o2.order_date AS last_purchase FROM orders o1 JOIN orders o2 ON o1.customer_id = o2.customer_id
C.SELECT customer_id, order_date AS first_purchase, ... FROM (SELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date) AS rn) WHERE rn = 1
D.SELECT customer_id, MIN(order_date) AS first_purchase, MAX(order_date) AS last_purchase FROM orders GROUP BY customer_id
AnswerD

Simple and efficient aggregation.

Why this answer

It uses aggregate functions MIN() and MAX() with GROUP BY customer_id to directly compute the first and last purchase dates from the orders table. This is the most efficient and idiomatic SQL approach in BigQuery, leveraging the database engine's built-in aggregation to avoid self-joins or subqueries.

Exam trap

Google Cloud often tests the misconception that window functions or self-joins are necessary for per-group min/max calculations, when in fact simple aggregation with GROUP BY is the correct and efficient solution.

How to eliminate wrong answers

Option A is wrong because the subquery lacks a correlation to the outer customer_id, returning the same global first order date for all customers instead of per-customer values. Option B is wrong because the self-join without aggregation or date filtering produces a Cartesian product of all order pairs per customer, not the first and last dates. Option C is wrong because it only captures the first purchase (ROW_NUMBER() = 1) and omits the last purchase date entirely, failing to meet the requirement for both dates.

853
MCQmedium

A batch job on GKE needs to be resilient to node failures. The job creates several pods that run for a few minutes each. The team wants to ensure that during a voluntary node disruption (e.g., node upgrade), only a limited number of pods are affected. Which resource should they configure?

A.Vertical Pod Autoscaler
B.Horizontal Pod Autoscaler
C.Cluster Autoscaler
D.Pod Disruption Budget
AnswerD

PDB defines how many pods can be disrupted at a time.

Why this answer

PodDisruptionBudget (PDB) specifies the minimum number of pods that must remain available during voluntary disruptions, protecting the job.

854
MCQhard

A company uses Cloud Build to build and deploy microservices to GKE. Each microservice has environment-specific configurations (dev, staging, prod). They want to manage these configurations using Kustomize. How should they structure the pipeline?

A.Store all configurations in separate branches
B.Use Helm charts with different values files
C.Create separate cloudbuild.yaml files for each environment
D.Use a single cloudbuild.yaml with kustomize build command and pass the environment as a substitution
AnswerD

Kustomize build with overlays + Cloud Build substitutions is the recommended approach.

Why this answer

Kustomize allows overlays for different environments. The cloudbuild.yaml can use the kustomize builder to apply the appropriate overlay based on a substitution variable like $_ENV.

855
MCQhard

You are implementing a chaos engineering experiment on a GKE cluster using Chaos Mesh. You want to test the resilience of a microservice by injecting a 5-second delay into 50% of HTTP requests to a specific service. Which Chaos Mesh resource should you use?

A.NetworkChaos
B.Traffic Director fault injection
C.HTTPChaos
D.PodChaos
AnswerC

HTTPChaos injects faults at the HTTP request level, supporting delay injection with configurable percentage.

Why this answer

Chaos Mesh provides different chaos types: PodChaos (kill pods), NetworkChaos (delay/loss), HTTPChaos (HTTP fault injection). HTTPChaos directly injects faults into HTTP requests, allowing delay injection with a percentage. Traffic Director fault injection is for services mesh but not Chaos Mesh.

So HTTPChaos is correct.

856
MCQmedium

An organization is planning a database migration from Oracle to PostgreSQL on Cloud SQL. They have a large number of stored procedures that use Oracle-specific PL/SQL features. Which tool should they use to automate the schema conversion, including conversion of PL/SQL to PL/pgSQL?

A.Ora2Pg
B.pglogical
C.pg_dump
D.Database Migration Service (DMS)
AnswerA

Ora2Pg is designed to convert Oracle schemas and objects to PostgreSQL.

Why this answer

Ora2Pg is an open-source tool specifically designed to automate the migration of Oracle databases to PostgreSQL, including the conversion of Oracle-specific PL/SQL stored procedures into PL/pgSQL. It handles schema objects, data types, and procedural code, making it the correct choice for this scenario where PL/SQL conversion is a key requirement.

Exam trap

A common misconception is that Database Migration Service (DMS) can handle all aspects of migration including PL/SQL conversion, but DMS primarily handles data transfer and schema creation, not procedural code conversion, which requires a specialized tool like Ora2Pg.

How to eliminate wrong answers

Option B (pglogical) is wrong because it is a PostgreSQL extension for logical replication, not a schema or PL/SQL conversion tool; it replicates data changes between PostgreSQL databases but cannot convert Oracle PL/SQL. Option C (pg_dump) is wrong because it is a utility for backing up and restoring PostgreSQL databases, not for converting Oracle schemas or PL/SQL code. Option D (Database Migration Service) is wrong because while DMS can migrate data from Oracle to Cloud SQL, it does not automate the conversion of PL/SQL to PL/pgSQL; it relies on other tools like Ora2Pg or manual rewriting for stored procedure conversion.

857
MCQmedium

A data engineer notices that a scheduled query exporting BigQuery data to Cloud Storage is failing with a timeout error. The dataset contains 500 million rows. What should they do?

A.Use SELECT * without filters.
B.Change the export format from CSV to Avro.
C.Increase the query timeout setting.
D.Export each partition separately.
AnswerD

Exporting partitions individually reduces data per job, ensuring each finishes within the timeout.

Why this answer

Exporting a 500-million-row table as a single operation can exceed BigQuery's 6-hour timeout limit. By exporting each partition separately, you reduce the data volume per export job, allowing each to complete within the timeout window. BigQuery's partitioned tables enable parallel exports, avoiding the fixed timeout limit which cannot be increased.

Exam trap

Google Cloud often tests the misconception that timeout errors can be resolved by increasing a timeout setting, but in BigQuery, export job timeouts are fixed and cannot be changed, so the correct approach is to reduce the data per export job.

How to eliminate wrong answers

Option A is wrong because using SELECT * without filters does not reduce the data volume; it exports all 500 million rows, which is the root cause of the timeout. Option B is wrong because changing the export format from CSV to Avro does not affect the timeout; the timeout is based on data volume and complexity, not the output format. Option C is wrong because increasing the query timeout setting does not apply to export jobs; BigQuery export operations have a fixed 6-hour timeout that cannot be modified by the user.

858
MCQeasy

An organization needs a fully managed, globally distributed relational database with strong consistency and horizontal scaling for a multi-region application. Which service meets these requirements?

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

Spanner is globally distributed with strong consistency.

Why this answer

Cloud Spanner provides global distribution, strong consistency, horizontal scaling, and relational features.

859
Multi-Selecthard

A company is migrating its on-premises PostgreSQL database to Cloud SQL. The database is 2 TB and the migration must have minimal downtime. The source database supports continuous archiving. Which three steps should they take? (Choose THREE.)

Select 3 answers
A.Use pg_dump to export the database and import into Cloud SQL.
B.Perform the cutover by promoting the Cloud SQL instance to primary.
C.Enable binary logging on the source database.
D.Set up Cloud SQL as an external replica of the on-premises database.
E.Use Database Migration Service with continuous migration.
AnswersB, D, E

Once replication is caught up, promote the Cloud SQL instance to become the new primary.

Why this answer

Promoting the Cloud SQL instance to primary is the final step in a migration using continuous replication, which minimizes downtime by allowing the source database to remain operational until the cutover. This approach leverages Cloud SQL's ability to act as a replica that stays synchronized with the on-premises database via continuous archiving, ensuring data consistency with minimal interruption.

Exam trap

A common trap is confusing PostgreSQL's WAL-based replication with MySQL's binary logging; candidates familiar with MySQL may incorrectly select Option C, but for PostgreSQL to Cloud SQL, the correct approach uses Database Migration Service with continuous migration and WAL replication.

860
MCQmedium

A service has an SLO of 99.9% availability over a 30-day window. The team wants to automate a deployment rollback if the error budget burn rate exceeds 10x over a 30-minute window. Which combination of Cloud Monitoring and Cloud Build should be used?

A.Create a Cloud Scheduler job that checks Cloud Monitoring metrics every 30 minutes and triggers rollback if needed
B.Create a custom burn rate alert in Cloud Monitoring that sends a notification to a Cloud Function via HTTP, which then triggers Cloud Build to rollback
C.Configure Cloud Build to poll Cloud Monitoring metrics and trigger rollback when burn rate exceeds threshold
D.Use Cloud Monitoring's built-in rollback action in alert policies
AnswerB

This is a standard pattern: alert → Cloud Function → Cloud Build rollback.

Why this answer

Cloud Monitoring can evaluate alert conditions and send notifications. Cloud Build can be triggered via webhooks or Pub/Sub. The correct approach is to create an alert policy with a custom condition for burn rate > 10x over 30 minutes, and configure the notification to invoke a Cloud Function or Cloud Run service that triggers a rollback using Cloud Build or Deployment Manager.

Alternatively, Cloud Monitoring can directly use a webhook to call a Cloud Function. The simplest is to use a Cloud Function as the notification channel.

861
Multi-Selectmedium

A company runs a GKE cluster and wants to ensure that during a planned node upgrade, their application remains available with minimal disruption. Which TWO steps should they take? (Choose two.)

Select 2 answers
A.Deploy multiple replicas of the application across different nodes.
B.Increase the max surge of the deployment to 100%.
C.Set the cluster autoscaler scale-down delay to 0.
D.Create a PodDisruptionBudget for the deployment with minAvailable set to a value that ensures availability.
E.Use a single replica per node to simplify management.
AnswersA, D

Multiple replicas ensure that if one node is drained, other replicas handle traffic.

Why this answer

PodDisruptionBudgets (PDBs) ensure a minimum number of pods are available during voluntary disruptions like upgrades. Using multiple replicas across nodes provides redundancy. Increasing max surge helps but is not a direct disruption mitigation.

862
MCQmedium

You are using Cloud Spanner and need to add a new column to an existing table. The table has millions of rows and must remain fully available for reads and writes during the schema change. What is the correct approach?

A.Export the table using Dataflow, add the column locally, then import the data back.
B.Use gcloud spanner instances update to modify the table schema.
C.Take the instance offline, run the ALTER TABLE, then bring it back online.
D.Use gcloud spanner databases ddl update with the ALTER TABLE statement; Spanner applies the change online.
AnswerD

Spanner DDL operations are non-blocking, so the table remains available during schema changes.

Why this answer

Cloud Spanner supports non-blocking schema changes using DDL statements like ALTER TABLE ... ADD COLUMN. These operations are applied online without locking the table.

The --async flag is optional for running the command asynchronously. The statement is executed via gcloud spanner databases ddl update.

863
Multi-Selecthard

A team needs to automate the reduction of toil in their operations. Which THREE of the following are valid strategies to reduce toil according to SRE principles?

Select 3 answers
A.Automating repetitive manual tasks using Cloud Functions
B.Scaling the operations team to handle more manual work
C.Using Workflows to orchestrate multi-step operations without manual intervention
D.Creating self-service tools for developers to deploy their own services
E.Setting a toil budget that limits toil to 50% of the team's time
AnswersA, C, D

Cloud Functions automates event-driven tasks.

Why this answer

Toil reduction involves automating repetitive manual tasks. Creating self-service tools, automating with Cloud Functions, and using Workflows for orchestration are valid strategies. Limiting toil to 50% of time is a tracking goal.

Scaling team size is not a toil reduction strategy.

864
MCQeasy

A startup uses Cloud SQL (MySQL) for a blogging platform. The schema has a table 'posts' with columns: post_id (auto-increment PK), title, content, author_id, created_at. The application frequently runs a query to display the latest 10 posts from a specific author: SELECT * FROM posts WHERE author_id = ? ORDER BY created_at DESC LIMIT 10. This query is slow when an author has thousands of posts. The team wants to optimize this query without changing the application code. What schema change will be most effective?

A.Add a composite index on (author_id, created_at DESC).
B.Partition the table by author_id using range partitioning.
C.Increase the query cache size in Cloud SQL.
D.Migrate the posts table to Cloud Spanner and use interleaved indexes.
AnswerA

This index directly supports the query, allowing an index range scan and limit.

Why this answer

A composite index on (author_id, created_at DESC) allows the database to efficiently locate posts for a given author sorted by creation date without scanning all rows. Option B (partitioning by author_id) does not directly help because ordering across partitions would still require sorting or scanning all partitions. Option C (increasing query cache) is not a schema change and may not help if the query is not cached or the data changes frequently.

Option D (migrating to Spanner) is a drastic change and not necessary; a well-designed index in Cloud SQL can solve the issue.

Exam trap

Watch out for the option letter mix-up. Partitioning might seem useful but does not optimally support ORDER BY and LIMIT across partitions; a composite index is more effective.

865
MCQmedium

A company is using DMS to migrate from MySQL to Cloud SQL. During the full dump phase, the migration is taking longer than expected. Which factor most likely affects the duration of the full dump?

A.Source database engine version
B.Size of the source database
C.Number of tables in the source
D.Replication lag during CDC
AnswerB

Larger databases take longer to dump and transfer.

Why this answer

The duration of the full dump phase primarily depends on the size of the database and the network bandwidth. The number of tables has some impact, but size is more significant. CDC lag is relevant during CDC phase, not full dump.

Source engine version may affect compatibility but not duration significantly.

866
MCQeasy

An engineer wants to run two Cloud Build steps in parallel to speed up the build. How should they configure the cloudbuild.yaml?

A.Use two separate cloudbuild.yaml files and run them concurrently
B.Set `waitFor: ['previous']` on both steps
C.Define steps under a `parallel` key in cloudbuild.yaml
D.Set `waitFor: ['-']` on both steps and ensure they are defined sequentially in the YAML
AnswerD

Correct: `waitFor: ['-']` indicates no dependencies, so they run in parallel.

Why this answer

In Cloud Build, steps defined sequentially in the YAML run in order by default. To run two steps in parallel, you set `waitFor: ['-']` on both steps, which tells Cloud Build not to wait for any previous step. This allows them to start simultaneously.

Option D correctly describes this configuration.

Exam trap

The trap is that candidates assume a `parallel` keyword exists in Cloud Build or misunderstand the `waitFor` syntax. In Cloud Build, steps run sequentially by default unless `waitFor: ['-']` is used to indicate no dependency, allowing parallel execution.

How to eliminate wrong answers

Option A is wrong because Cloud Build does not support running multiple cloudbuild.yaml files concurrently; you would need to trigger separate builds manually, which is not a parallel step configuration. Option B is wrong because `waitFor: ['previous']` is not a valid value; the correct syntax is `waitFor: ['step-name']` or `-` for no wait, and 'previous' would cause a syntax error or unexpected behavior. Option C is wrong because Cloud Build does not have a `parallel` key; parallelism is achieved by setting `waitFor: ['-']` on steps defined sequentially in the YAML.

867
MCQeasy

A Database Engineer is responsible for managing a Cloud SQL for MySQL instance. The engineer needs to ensure that automated backups are retained for 14 days and that point-in-time recovery (PITR) is enabled. Which configuration should the engineer set?

A.Create scheduled manual backups each day and retain them for 14 days; PITR is not needed because backups are daily.
B.Enable automated backups, set backup retention to 14 days, and enable binary logging.
C.Enable automated backups with a retention of 14 days; PITR is automatically enabled.
D.Enable automated backups with 14-day retention and set up a cross-region replica for disaster recovery.
AnswerB

Automated backups with binary logging enable PITR.

Why this answer

Enabling automated backups with a 14-day retention ensures backup files are kept for the required duration, and enabling binary logging (which is required for PITR) allows point-in-time recovery by replaying transaction logs against a base backup. In Cloud SQL for MySQL, PITR is not automatically enabled with automated backups; binary logging must be explicitly enabled.

Exam trap

The trap here is that candidates assume enabling automated backups automatically enables point-in-time recovery, but Cloud SQL for MySQL requires binary logging to be separately enabled for PITR functionality.

How to eliminate wrong answers

Option A is wrong because scheduled manual backups do not provide the continuous transaction log coverage needed for point-in-time recovery, and PITR is still required for granular recovery to a specific timestamp, not just daily backups. Option C is wrong because PITR is not automatically enabled when automated backups are enabled; binary logging must be explicitly turned on to support PITR. Option D is wrong because a cross-region replica provides disaster recovery and high availability, not point-in-time recovery; PITR requires binary logging, not replication.

868
MCQeasy

A company is designing a BigQuery data model for a business intelligence dashboard that shows sales by region and product. The data is refreshed daily. Which schema design is MOST cost-effective and performant for this use case?

A.A table with nested repeated columns for regions and products within each sale.
B.A star schema with a fact table for sales and separate dimension tables for region and product.
C.A fully normalized schema with separate tables for each attribute.
D.A single flat table containing all sales, region, and product columns.
AnswerB

Star schemas are optimized for BI workloads, reducing data scanned and improving query performance.

Why this answer

A star schema with a fact table for sales and dimension tables for region and product is optimized for analytical queries in BigQuery, providing a balance of query performance and storage efficiency for daily refreshes. Option A is wrong because nested repeated columns can complicate queries and are less efficient for the simple dimensional analysis required by a BI dashboard. Option C is wrong because a fully normalized schema with many joins increases query complexity and latency, making it less performant for BI workloads.

Option D is wrong because a single flat table leads to higher storage costs and slower queries due to scanning unnecessary columns and data duplication.

869
MCQmedium

A company uses Pub/Sub to ingest events from multiple services. They notice a backlog of unacknowledged messages and want to increase the throughput of their subscriber. The subscriber is a single process running on Compute Engine. What is the most effective way to increase throughput?

A.Decrease the flow control max outstanding messages.
B.Increase the acknowledgement deadline to 10 minutes.
C.Add more subscriber instances running in parallel.
D.Enable ordering keys on the subscription.
AnswerC

Multiple subscribers pull from the same subscription, increasing total throughput.

Why this answer

Running multiple subscriber instances (parallel pull consumers) increases the overall throughput by allowing more messages to be pulled and processed concurrently.

870
MCQmedium

During a MySQL to Cloud SQL migration using DMS, the migration job fails during the full dump phase with an error indicating 'Access denied for user'. The DMS connection profile to the source was created with a user that has only SELECT privileges. What additional privilege is required for the full dump?

A.INSERT privilege
B.RELOAD privilege
C.SUPER privilege
D.CREATE privilege
AnswerB

RELOAD is needed for FLUSH operations during mysqldump.

Why this answer

DMS full dump uses mysqldump, which requires the RELOAD privilege to flush tables and the LOCK TABLES privilege for consistency. Without RELOAD, the dump cannot proceed.

871
MCQmedium

A company wants to enforce that all Compute Engine VMs have Shielded VM features enabled. Which mechanism should they use?

A.Set an organization policy with constraint `compute.requireShieldedVm`.
B.Configure a VPC firewall rule to block non-Shielded VMs.
C.Use Cloud Security Command Center to detect non-Shielded VMs.
D.Use IAM to restrict VM creation to users who have permissions to enable Shielded VM.
AnswerA

This constraint forces Shielded VM to be enabled on new instances.

Why this answer

Organization policy `compute.requireShieldedVm` enforces that new VMs must have Shielded VM features. This is an organization policy constraint.

872
MCQmedium

A company is designing a schema for Cloud Bigtable to store user sessions. Access patterns: (1) read all sessions for a given user ID, and (2) read a specific session by session ID. The row key should support both patterns efficiently. Which row key design is MOST appropriate?

A.Use user_id#session_id as the row key
B.Use session_id as the row key and store user_id as a column
C.Use a hash of user_id as row key prefix and session_id as suffix
D.Use user_id as the row key and store multiple session columns
AnswerA

This allows scanning by user_id prefix and point lookup by full key, supporting both access patterns.

Why this answer

Using 'user_id#session_id' as the row key allows prefix scans on user_id to retrieve all sessions for a user, and exact lookups on the full key for a specific session. This is a common pattern for Bigtable.

873
MCQmedium

An e-commerce platform uses Cloud SQL for PostgreSQL to manage orders. The application team reports that the database experiences performance degradation during peak hours due to high connection churn. They want to maintain a pool of established connections. Which configuration change addresses this without application code changes?

A.Reduce the max_connections flag to force the application to reuse connections.
B.Increase the max_connections flag to a higher value.
C.Switch to Cloud SQL for MySQL, which has built-in connection pooling.
D.Enable the pgBouncer flag to use transaction pooling.
AnswerD

PgBouncer provides connection pooling, reusing connections and reducing churn, without application changes.

Why this answer

Enabling the pgBouncer flag in Cloud SQL for PostgreSQL provides a built-in connection pooler that maintains persistent connections to the database, reducing the overhead of frequent connection establishment. pgBouncer operates in transaction pooling mode, which allows multiple client connections to share a smaller pool of backend connections, directly addressing high connection churn without requiring any application code changes.

Exam trap

Google Cloud exams often test the misconception that increasing or decreasing max_connections alone can solve connection churn, when in reality connection pooling (like pgBouncer) is the correct solution to reduce overhead without application changes.

How to eliminate wrong answers

Option A is wrong because reducing max_connections does not force connection reuse; it simply limits the total number of concurrent connections, which can cause connection failures or queueing without solving churn. Option B is wrong because increasing max_connections allows more concurrent connections but does not reduce churn; it may actually worsen performance by increasing overhead from establishing and tearing down connections. Option C is wrong because switching to Cloud SQL for MySQL does not provide built-in connection pooling; MySQL does not include a native connection pooler like pgBouncer, and this would require application changes or additional middleware.

874
MCQhard

A social media company uses Cloud Spanner with a multi-region configuration. During a regional outage, automatic failover occurred, but some transactions that were in-flight at the time of failure were lost. What is the most likely reason for this data loss?

A.The database had schema changes that were not replicated to standby replicas
B.The transaction isolation level was set to read committed instead of serializable
C.The application did not retry failed transactions after the failover
D.The multi-region configuration included read-only replicas in some regions, causing loss of recent writes
AnswerD

Only read-write replicas can become the new leader. If a region has only read-only replicas, committed transactions from the old leader may not be fully replicated before failover, resulting in data loss.

Why this answer

In a multi-region Spanner configuration, the leader region handles writes. If a transaction was committed but not yet replicated to other regions before the leader region failed, it could be lost if the new leader region does not have that data. However, Spanner's multi-region configurations are designed for RPO=0 (no data loss) when using read-write replicas.

If read-only replicas are used in some regions, data loss can occur because those replicas do not participate in the voting. The most common cause of data loss in Spanner multi-region is a misconfiguration where not all regions have read-write replicas.

875
MCQhard

A Cloud Bigtable instance experiences a sudden increase in read latency and request errors. The operations team notices that one node is handling disproportionately more traffic. Which tool should they use to diagnose the issue?

A.Key Visualiser
B.Stackdriver Monitoring dashboard
C.gcloud bigtable instances describe
D.Use the cbt command to scan the table
AnswerA

Key Visualiser is designed to identify hot spots by visualising read/write patterns across key ranges.

Why this answer

Key Visualizer is the correct tool because it provides a heatmap of access patterns across row key ranges, allowing you to identify hot spots where a single node is overloaded due to uneven key distribution. This directly addresses the symptom of one node handling disproportionately more traffic, which is a common cause of increased latency and errors in Cloud Bigtable.

Exam trap

A common mistake is to choose Cloud Monitoring (formerly Stackdriver) because it shows aggregate latency and error metrics, but it does not pinpoint which row keys are causing the hotspot. Key Visualizer is the specialized tool for analyzing access patterns by row key range.

How to eliminate wrong answers

Option B is wrong because Stackdriver Monitoring (now Cloud Monitoring) provides aggregate metrics like average latency and error rates, but it does not offer per-node or per-key-range granularity to pinpoint which specific row keys are causing the hot spot. Option C is wrong because 'gcloud bigtable instances describe' returns metadata about the instance (e.g., display name, cluster configuration) but no real-time traffic distribution or performance data. Option D is wrong because the 'cbt' command is used for manual table operations like reading or writing data, not for diagnosing traffic imbalance or hot spots; scanning the table would not reveal which node is overloaded.

876
MCQeasy

A company is migrating a PostgreSQL database to Cloud SQL using DMS with continuous CDC. During cutover, the engineer checks DMS metrics and sees the replication lag is consistently 0 seconds. What is the next step to complete the migration?

A.Promote the destination Cloud SQL instance.
B.Restart the migration job.
C.Increase the number of DMS worker nodes.
D.Delete the source database.
AnswerA

Promoting makes Cloud SQL the primary and stops replication.

Why this answer

When the lag is 0, the source and target are in sync. The next step is to promote the destination (Cloud SQL) to make it the primary, which stops replication and allows writes.

877
MCQmedium

A DevOps engineer wants to visualize the 99th percentile latency of an HTTP endpoint over the past week using Cloud Monitoring dashboards. The metric is available as a distribution from Cloud Trace. Which chart type should they use to display this percentile over time?

A.Heatmap
B.Line chart
C.Stacked bar chart
D.Scatter chart
AnswerB

Line charts are optimal for displaying continuous data points over time, such as percentile values.

Why this answer

A line chart is best for showing a metric value (like 99th percentile latency) over time. Heatmaps are for distributions, scatter plots show correlation, and stacked bars show contributions of components. The percentile over time is a single value per time point, so a line chart is appropriate.

878
MCQmedium

Refer to the exhibit. A developer tries to connect to a Cloud SQL instance from a VM using the public IP. The connection fails with this error. What should the developer do to fix the connection?

A.Enable SSL-only mode on the Cloud SQL instance.
B.Add the client IP to the authorized networks.
C.Connect using the Cloud SQL Proxy.
D.Change the instance to require SSL for private connections.
AnswerC

The Cloud SQL Proxy handles SSL encryption and IAM authentication, bypassing the need for client-side SSL configuration.

Why this answer

The error indicates that the Cloud SQL instance does not have an authorized network allowing the VM's public IP. However, the correct fix is to use the Cloud SQL Proxy, which establishes a secure, authenticated tunnel to the instance without needing to authorize the VM's IP. The proxy handles IAM-based authentication and encryption, bypassing the public IP network authorization requirement entirely.

Exam trap

Google Cloud often tests the misconception that adding the client IP to authorized networks is the only way to fix a public IP connection failure, but the trap is that the Cloud SQL Proxy is the secure, recommended alternative that avoids IP management and works even when the VM's IP is not static or known.

How to eliminate wrong answers

Option A is wrong because enabling SSL-only mode enforces encryption for connections but does not bypass the authorized networks check; the connection would still fail if the client IP is not authorized. Option B is wrong because adding the client IP to authorized networks would work in principle, but the question implies the developer is using a VM with a dynamic or non-static public IP, making this approach impractical and insecure; the Cloud SQL Proxy is the recommended solution for such scenarios. Option D is wrong because requiring SSL for private connections applies only to private IP connections, not public IP connections, and does not resolve the public IP authorization issue.

879
MCQeasy

A company uses Cloud Spanner with a multi-region configuration (nam3) for a global application. They notice that write latency has increased significantly during peak hours. After investigation, they find that the number of splits has increased from 10 to 50, and the CPU utilization on most nodes is below 10%. However, writes are being throttled due to excessive hot spots on a few nodes. What should they do?

A.Redesign the primary key to avoid monotonic increases
B.Enable interleaved tables
C.Increase the number of nodes
D.Use a read replica
AnswerA

Using a non-monotonic key (e.g., hashed or UUID) spreads writes across all splits, reducing hot spots and throttling.

Why this answer

Hot spots in Spanner are often caused by monotonically increasing primary keys, which concentrate writes on a few splits. Redesigning the key to distribute writes (e.g., using a hash prefix) spreads the load evenly. Option C (increase nodes) does not fix the hot spot; the bottleneck is lock contention on specific splits.

Option B (interleaved tables) helps with child table joins but not with primary key distribution. Option D (read replicas) is for read scaling, not write throughput.

880
Multi-Selecteasy

A company uses Cloud SQL for MySQL and wants to define backup retention policies for compliance. Which TWO statements about Cloud SQL backup retention are correct? (Choose 2)

Select 2 answers
A.The maximum retention period for automated backups is 365 days.
B.Point-in-time recovery logs are retained for a maximum of 7 days.
C.Automated backups are retained for a minimum of 7 days.
D.The maximum number of automated backups retained is 365.
E.Backups are always stored in the same region as the database.
AnswersA, D

Correct: you can set retention days up to 365.

Why this answer

Cloud SQL supports up to 365 automated backups and allows setting retention days up to 365. Point-in-time recovery also has a configurable retention.

881
MCQmedium

You are designing a Cloud SQL for PostgreSQL instance for an OLTP application. The application typically handles 500 concurrent connections and the working set is 8 GB. You estimate a buffer pool of 4 GB. What minimum memory allocation should you choose?

A.12 GB
B.15 GB
C.8 GB
D.26 GB
AnswerB

15 GB provides enough memory for working set, buffer pool, and connection overhead.

Why this answer

Cloud SQL PostgreSQL recommends max_connections = RAM_MB/16, but this is a soft limit. More importantly, memory must accommodate the working set and buffer pool. With 500 connections, 8 GB working set + 4 GB buffer pool = 12 GB, but PostgreSQL also needs overhead.

A safe minimum is 15 GB, but the smallest Cloud SQL tier with >12 GB is 15 GB (e.g., db-custom-2-15360). However, among the options, 15 GB is the only viable choice. Note: max_connections formula suggests 15GB RAM gives ~960 connections, which covers 500.

882
MCQeasy

A developer wants to deploy a containerized application to Cloud Run with a requirement that the service has at least 2 instances always running to handle low-latency requests. Which flag should they use with gcloud run deploy?

A.--concurrency=2
B.--cpu-throttling
C.--min-instances=2
D.--max-instances=2
AnswerC

This sets the minimum number of instances to 2.

Why this answer

The `--min-instances` flag in `gcloud run deploy` specifies the minimum number of container instances that must remain warm and ready to serve requests at all times. Setting `--min-instances=2` ensures Cloud Run keeps at least two instances always running, which eliminates cold starts and guarantees low-latency responses for incoming traffic.

Exam trap

Candidates often confuse `--min-instances` (which ensures a baseline of running instances) with `--max-instances` (which limits scaling) or `--concurrency` (which controls per-instance request handling) in Google Cloud Run, leading them to pick options that address scaling limits or concurrency rather than instance availability.

How to eliminate wrong answers

Option A is wrong because `--concurrency` sets the maximum number of simultaneous requests each container instance can handle, not the number of instances; it controls request multiplexing, not instance count. Option B is wrong because `--cpu-throttling` (or its absence) controls whether CPU is throttled during idle periods, which affects instance scaling behavior but does not set a minimum instance count. Option D is wrong because `--max-instances=2` caps the maximum number of instances the service can scale to, which would prevent scaling beyond two instances but does not guarantee that at least two are always running.

883
MCQeasy

A mobile app stores user profiles in Firestore. Users are spread globally. Which data model ensures low latency reads and writes?

A.A single collection containing all user documents
B.One document per user in a single collection with composite indexes
C.One collection per geographic region
D.Subcollections under a geographic region collection (e.g., /regions/{region}/users/{user})
AnswerD

Using subcollections under region documents distributes writes across regions, improving latency.

Why this answer

It uses geographic region as the top-level collection key, which enables Firestore to co-locate user documents within the same region. This minimizes latency by ensuring that reads and writes for users in the same geographic area are served from a nearby Firestore instance, leveraging Firestore's automatic multi-region replication and strong consistency within a location.

Exam trap

The trap here is that candidates confuse composite indexes with data locality, assuming indexes solve latency issues, when in fact Firestore's performance depends on document grouping and proximity to the client's location.

How to eliminate wrong answers

Option A is wrong because a single collection containing all user documents forces Firestore to distribute documents across multiple regions, increasing read and write latency for globally distributed users due to cross-region data access. Option B is wrong because composite indexes do not affect data locality; they only optimize query performance, not reduce latency for geographically dispersed users. Option C is wrong because while it groups users by region, it still stores all user documents in a single collection per region, which does not provide the same locality benefits as using subcollections under a region document, and it can lead to hot-spotting on the region document itself.

884
MCQmedium

An organization uses Cloud SQL for MySQL and needs to perform disaster recovery testing by failing over to a cross-region read replica without impacting the primary instance. They want to validate the promotion process and measure the actual RTO. Which approach should be used?

A.Create a clone of the primary instance in the target region and test failover
B.Use Cloud SQL’s switchover feature for HA instances
C.Promote a cross-region read replica in an isolated project or non-production environment
D.Run a gcloud command to promote the existing read replica in the production project
AnswerC

Promoting a replica that is not serving production traffic allows safe DR testing while measuring RPO (replication lag) and RTO (promotion time).

Why this answer

The safest way to test DR without impacting the primary is to promote a cross-region read replica in a non-production environment or an isolated project. The promotion is manual and can be tested by simulating a failover scenario. Alternatively, you can clone the replica to a separate instance for testing, but the most direct test is promoting a replica that is not serving production traffic.

885
Multi-Selectmedium

An SRE team wants to implement a blameless postmortem culture after incidents. Which TWO practices are essential for a blameless postmortem?

Select 2 answers
A.Escalating the incident to the executive team
B.Assigning monetary fines to the team responsible
C.Conducting a root cause analysis using the 5 Whys technique
D.Identifying the individual responsible for the incident
E.Creating action items with owners and due dates
AnswersC, E

The 5 Whys helps uncover systemic root causes.

Why this answer

A blameless postmortem focuses on systemic issues, not individual blame. Action items with owners and dates ensure follow-through. The 5 Whys technique helps identify root causes.

886
Multi-Selecthard

A company runs a critical application on AlloyDB in a single zone. They want to improve resiliency with an RTO under 30 seconds and RPO near zero. Which THREE steps should they take? (Choose 3)

Select 3 answers
A.Increase the number of CPU cores in the primary instance.
B.Configure application connection retry logic to handle failover interruptions.
C.Configure a cross-region read replica in a different region.
D.Perform regular failover drills to ensure RTO targets are met.
E.Enable high availability (HA) on the AlloyDB cluster.
AnswersB, D, E

Retry logic ensures application reconnects to the new primary after failover.

Why this answer

To achieve RTO<30s and RPO near zero, you need to enable AlloyDB HA (primary + standby in different zone), ensure the application retries connections during failover, and regularly test failover to validate RTO.

887
MCQeasy

You need to create a custom metric to monitor the number of user logins per minute. Which metric kind should you use?

A.DELTA
B.GAUGE
C.Counter
D.CUMULATIVE
AnswerD

CUMULATIVE measures a monotonically increasing count over time, suitable for login counts.

Why this answer

A CUMULATIVE metric measures a count over time that increases monotonically, such as total logins. GAUGE measures an instantaneous value, DELTA measures a value over an interval, and a counter is not a metric kind.

888
MCQmedium

A team uses Cloud Monitoring to track availability SLI as good-request-count / valid-request-count. They want to create a window-based SLO. Which metric filter should they use for the numerator?

A.total number of minutes in a month.
B.count of minutes where availability >= 99.9%.
C.count of requests with status 200.
D.count of errors.
AnswerB

This is the correct definition for the numerator of a window-based SLO: minutes meeting the threshold.

Why this answer

Window-based SLOs use 'good minutes' where the availability is above a threshold (e.g., 99.9% of requests succeeded). The numerator is the count of minutes where the SLI was good.

889
MCQmedium

A company uses Cloud Build to build a container image with Kaniko. They want to speed up builds by caching the base image layers. Which configuration should they add to their cloudbuild.yaml?

A.Add a 'docker pull' step before the Kaniko step to pre-pull the base image.
B.Use Docker's --layer-cache flag in the build step.
C.Configure Cloud Build to use a private pool with SSD persistent disks.
D.Add '--cache=true' and '--cache-repo=us-central1-docker.pkg.dev/$PROJECT_ID/cache' to the Kaniko builder arguments.
AnswerD

This enables Kaniko cache and specifies the repository for cache storage.

Why this answer

Kaniko does not rely on the Docker daemon, so it cannot use Docker's native layer caching. Instead, Kaniko supports remote caching by pushing cached layers to a container registry. Adding `--cache=true` enables layer caching, and `--cache-repo` specifies the registry repository where cached base image layers are stored, allowing subsequent builds to reuse them and significantly reduce build time.

Exam trap

Candidates often mistakenly apply Docker-specific flags or workflows to Kaniko builds, not realizing that Kaniko uses registry-based caching rather than relying on the Docker daemon.

How to eliminate wrong answers

Option A is wrong because adding a `docker pull` step before Kaniko is ineffective; Kaniko builds images without the Docker daemon, so pre-pulling with Docker does not populate Kaniko's cache. Option B is wrong because `--layer-cache` is not a valid Docker flag; Docker uses `--cache-from` for build cache, but Kaniko does not support Docker's build cache mechanism. Option C is wrong because using a private pool with SSD persistent disks improves I/O performance but does not address caching of base image layers; caching requires storing and retrieving layers from a remote repository, not local disk speed.

890
Multi-Selectmedium

A company is evaluating disaster recovery options for their production Bigtable instance. They need asynchronous replication with manual failover and the ability to route reads to the secondary cluster only when the primary is unhealthy. Which TWO settings should they configure? (Choose 2 correct answers.)

Select 2 answers
A.Use Cloud DNS health checks to update DNS records to point to the secondary cluster
B.Enable automatic failover by setting the replication to synchronous mode
C.Configure a multi-cluster routing policy with a single-cluster fallback
D.Create an app profile with read-failover routing policy
E.Create an app profile with any-replica routing policy
AnswersA, D

During manual failover, updating DNS records to point to the secondary is necessary, and health checks can automate this.

Why this answer

Bigtable replication supports asynchronous replication with app profiles. To achieve manual failover with read routing to the secondary cluster only when the primary is unhealthy, two configurations are needed: (1) A read-failover routing policy on an app profile directs reads to the secondary during a failover event, and (2) Cloud DNS health checks update DNS records to point to the secondary cluster, enabling manual failover control. Option B is incorrect because synchronous replication would require automatic failover, not manual.

Option C is incorrect because multi-cluster routing with single-cluster fallback does not meet the primary-unhealthy-only requirement. Option E is incorrect because any-replica routing would send reads to the secondary during normal operation, not just when primary is unhealthy.

891
Multi-Selectmedium

An organization is designing a Cloud Spanner schema for a social media application. The application frequently queries for all posts by a specific user, and also updates the number of likes on a post. To ensure high performance and avoid hotspots, which TWO schema design principles should the team apply? (Choose two.)

Select 2 answers
A.Interleave the Post table under the User table using UserID as the first part of the primary key
B.Use a secondary index on the Post table for UserID queries
C.Denormalize the like count into the User table to avoid joins
D.Use a monotonically increasing integer as the post ID to simplify indexing
E.Use a UUID as the post ID to distribute writes evenly
AnswersA, E

Interleaving provides data locality for user-post queries.

Why this answer

Interleaving the Post table under the User table colocates posts with their user, making queries for a user's posts efficient by reducing distributed reads. Using a UUID for the post ID ensures writes are distributed across the cluster, avoiding hotspots from sequential keys like timestamps.

892
Multi-Selecteasy

A database administrator wants to set up monitoring and alerting for Cloud SQL instances. They need to be notified when CPU utilisation exceeds 80% for more than 5 minutes and when replication lag on a read replica exceeds 30 seconds. Which two metrics should they create alerting policies for? (Choose TWO.)

Select 2 answers
A.cloudsql.googleapis.com/database/network/received_bytes_count
B.cloudsql.googleapis.com/database/disk/bytes_used
C.cloudsql.googleapis.com/database/replication/replica_lag
D.cloudsql.googleapis.com/database/cpu/utilization
E.agent.googleapis.com/cpu_usage
AnswersC, D

This metric measures replication lag in seconds.

Why this answer

Cloud SQL provides the metric 'cloudsql.googleapis.com/database/cpu/utilization' for CPU usage and 'cloudsql.googleapis.com/database/replication/replica_lag' for replication lag. Alerting policies can be set on these metrics in Cloud Monitoring.

893
MCQmedium

A team is migrating an on-premises Oracle database to Cloud SQL for PostgreSQL using DMS. They have completed the schema conversion using Ora2Pg and are now setting up continuous migration. The source database is behind a firewall. Which connectivity method should they use for the source connection profile if they cannot use public IP?

A.Configure a VPN or Dedicated Interconnect with VPC
B.VPC peering
C.Cloud SQL Auth Proxy
D.IP allowlisting
AnswerA

This provides secure private connectivity from on-premises to GCP.

Why this answer

Since the source Oracle database is behind a firewall and cannot use a public IP, a VPN or Dedicated Interconnect with VPC provides a private, encrypted connection between the on-premises network and Google Cloud. This allows Database Migration Service (DMS) to reach the source database securely without exposing it to the public internet. DMS supports connectivity via these private network paths when public IP is not an option.

Exam trap

Candidates often mistake VPC peering (which only connects two Google Cloud VPCs) as a solution for on-premises to Google Cloud connectivity. However, VPC peering does not extend to on-premises networks. The correct approach is to use a VPN or Dedicated Interconnect, which establish private connectivity between on-premises and Google Cloud, enabling DMS to access the source database securely.

How to eliminate wrong answers

Option B (VPC peering) is wrong because VPC peering connects two VPCs within Google Cloud, not an on-premises network; it cannot bridge the on-premises firewall. Option C (Cloud SQL Auth Proxy) is wrong because it is a client-side tool for connecting to Cloud SQL instances, not for connecting DMS to an external source database. Option D (IP allowlisting) is wrong because it requires the source database to have a public IP, which is explicitly not available in this scenario.

894
Multi-Selecthard

A company uses Cloud Spanner with a single-region configuration in us-central1. They need to improve disaster recovery to meet an RPO of zero and an RTO of less than 5 seconds across regions. Which three actions should they take? (Choose three.)

Select 3 answers
A.Add a cross-region read replica to the existing single-region instance
B.Use backup/restore to migrate data from the single-region instance to the new multi-region instance
C.Enable point-in-time recovery (PITR) with 7-day retention
D.Update application connection strings to point to the multi-region instance
E.Create a new multi-region Spanner instance with a two-region configuration (e.g., nam6)
AnswersB, D, E

Backup/restore is a reliable way to move data between instances.

Why this answer

To achieve RPO=0 and RTO<5s across regions, you need a multi-region Spanner configuration with synchronous replication. You cannot achieve cross-region RPO=0 with a single-region instance. Therefore, you must migrate to a multi-region configuration.

The steps include: 1) Create a new multi-region instance (e.g., nam6) with the desired config, 2) Migrate data from the single-region instance to the multi-region instance (e.g., using backup/restore or Dataflow), 3) Update application connection strings to point to the new instance. Optionally, you can perform a rolling migration to minimize downtime. Using cross-region read replicas is not possible for Spanner (Spanner does not have read replicas in the same sense; it uses replica types within an instance).

895
Multi-Selectmedium

An organization wants to enforce that no Compute Engine instances have public IP addresses. Which TWO methods can achieve this? (Choose TWO.)

Select 2 answers
A.Set the organization policy constraint constraints/compute.vmExternalIpAccess at the desired folder or project level.
B.Create a custom IAM role that denies the compute.instances.create permission with external IP.
C.Configure Shared VPC and only provide subnets without default internet access to service projects, ensuring VMs are created without external IPs.
D.Use VPC Service Controls to restrict access to Compute Engine API.
E.Set the organization policy constraint constraints/compute.vmCanIpForward to deny.
AnswersA, C

This constraint directly denies the creation of VMs with external IPs.

Why this answer

Organization policies can restrict external IPs at the project level (constraints/compute.vmExternalIpAccess). Also, using a Shared VPC and only creating VMs in subnets without external IP access (by not having a default route to the internet) can prevent public IPs, although a more direct method is the org policy.

896
MCQhard

A team is implementing Binary Authorization for containers deployed to GKE. They want to enforce that only images signed by their CI pipeline can be deployed. The CI pipeline runs in Cloud Build. What must they configure to allow Cloud Build to sign images?

A.Use Cloud KMS to sign the image digest and store the signature in Cloud Storage.
B.Enable the Binary Authorization API and configure a policy that requires attestations.
C.Grant the Cloud Build service account the roles/containeranalysis.notes.attacher role on the project.
D.Configure a Cloud Build step to run gcloud container binauthz attestations sign command.
AnswerC

This role allows Cloud Build to create attestations. Additionally, the service account needs roles/containeranalysis.occurrences.editor to attach attestations.

Why this answer

The Cloud Build service account needs the `roles/containeranalysis.notes.attacher` role to create attestations in Container Analysis. This role allows the service account to attach attestations to vulnerability notes, which are then used by Binary Authorization to verify that an image has been signed by the CI pipeline. Without this role, Cloud Build cannot create the attestations required for the Binary Authorization policy to enforce image signing.

Exam trap

Google Cloud often tests the misconception that enabling the Binary Authorization API and configuring a policy is sufficient, but candidates overlook that the CI pipeline's service account needs explicit IAM permissions to create attestations in Container Analysis.

How to eliminate wrong answers

Option A is wrong because Cloud KMS is used to sign the image digest, but the signature must be stored as an attestation in Container Analysis, not in Cloud Storage; storing in Cloud Storage would not integrate with Binary Authorization's attestation verification. Option B is wrong because enabling the Binary Authorization API and configuring a policy is necessary for enforcement, but it does not grant Cloud Build the ability to sign images; the service account still needs the specific role to create attestations. Option D is wrong because the `gcloud container binauthz attestations sign` command does not exist; the correct command is `gcloud container binauthz attestations create` to create an attestation, and signing is done separately using Cloud KMS or a PGP key.

897
MCQhard

A BigQuery table is partitioned by ingestion time (pseudo column _PARTITIONTIME) and uses the default partition expiration of 90 days. A data engineer runs a DELETE statement to remove rows older than 100 days. Why does this query process more bytes than expected?

A.The table is not partitioned; it is clustered.
B.The DELETE statement does not use a WHERE clause on a clustering column.
C.The DELETE statement filters on a custom timestamp column instead of _PARTITIONTIME.
D.The DELETE statement must scan all partitions because it uses a condition that does not prune partitions.
AnswerD

Without a filter on _PARTITIONTIME or a partition column, the query scans all partitions.

Why this answer

The DELETE statement uses a condition that does not reference the partitioning column (_PARTITIONTIME) in a way that allows partition pruning. Since the table is partitioned by ingestion time, BigQuery must scan all partitions to evaluate the filter, even though the condition logically targets rows older than 100 days. This results in processing more bytes than expected, as the default partition expiration of 90 days does not reduce the scan scope when the WHERE clause does not leverage the partitioning column.

Exam trap

Google Cloud often tests the misconception that a time-based filter on any timestamp column will trigger partition pruning, when in fact only filters on the specific partitioning column (like _PARTITIONTIME) enable partition elimination.

How to eliminate wrong answers

Option A is wrong because the table is explicitly described as partitioned by ingestion time, so it is partitioned, not just clustered. Option B is wrong because clustering columns are irrelevant for partition pruning; the issue is about partition-level filtering, not clustering. Option C is wrong because filtering on a custom timestamp column instead of _PARTITIONTIME would not cause partition pruning; however, the question states the DELETE removes rows older than 100 days, and if that custom column is used, it still would not prune partitions unless it is the partitioning column, but the core reason for scanning all partitions is the lack of a filter on _PARTITIONTIME, not the use of a custom column per se.

898
Multi-Selecteasy

Which TWO data type mappings are correct when converting Oracle data types to PostgreSQL?

Select 2 answers
A.Oracle CLOB → PostgreSQL TEXT
B.Oracle VARCHAR2(100) → PostgreSQL CHAR(100)
C.Oracle NUMBER(10,2) → PostgreSQL INTEGER
D.Oracle NUMBER(10) → PostgreSQL INTEGER
E.Oracle DATE → PostgreSQL DATE
AnswersA, D

Correct mapping for large character objects.

Why this answer

Oracle's CLOB stores large variable-length character data, and PostgreSQL's TEXT type is the direct equivalent, supporting up to 1 GB of character data without length limitations. Option D is correct because Oracle's NUMBER(10) without scale defaults to a whole number that fits into PostgreSQL's INTEGER (32-bit range). Options B, C, and E are incorrect: VARCHAR2(100) maps to PostgreSQL VARCHAR(100) or TEXT, not CHAR(100) (fixed-length); NUMBER(10,2) requires DECIMAL or NUMERIC to preserve precision; Oracle's DATE includes time components and maps to TIMESTAMP, not DATE.

Exam trap

A common pitfall in database migration exams is the assumption that Oracle's DATE and PostgreSQL's DATE are equivalent. In reality, Oracle's DATE includes time components, so it should typically map to PostgreSQL's TIMESTAMP, not DATE. Candidates may incorrectly mark this mapping as correct.

899
MCQmedium

Your GKE cluster is running a critical web application that experiences predictable traffic spikes during business hours. You want to minimize latency and avoid pod startup delays during scaling. The application uses CPU-intensive image processing. Which scaling strategy should you use?

A.Set a high number of static pods equal to peak traffic; use cluster autoscaler to add nodes.
B.Use VPA with updateMode: Auto to automatically adjust pod resources; enable cluster autoscaler to add nodes as required.
C.Deploy a CronJob to scale up replicas before business hours; rely on HPA to handle the rest.
D.Configure HPA with a minimum of 2 replicas and scale on CPU utilization; enable cluster autoscaler for node provisioning.
AnswerD

HPA with min replicas ensures baseline capacity to absorb spikes without cold starts; cluster autoscaler adds nodes as needed.

Why this answer

To avoid cold starts while ensuring pods can handle CPU spikes, you need a baseline of pods and dynamic scaling responsive to CPU. HPA with a minimum replicas of 2 ensures baseline capacity; HPA scales on CPU. Cluster autoscaler adds nodes if needed, but does not directly address pod startup delay.

VPA adjusts resource requests, which can help but does not prevent cold starts. Using HPA alone with min replicas avoids pod creation latency.

900
MCQhard

A company uses Cloud Spanner in a multi-region configuration with the leader region in us-central1. They want to improve write latency for users in Europe. The application's writes are latency-sensitive and must be strongly consistent. Which action should the engineer take?

A.Add more read-only replicas in the European region.
B.Use a regional Spanner instance in Europe and replicate data asynchronously to the multi-region instance.
C.Migrate the workload to Cloud Bigtable with replication.
D.Change the leader region to a European region, such as europe-west1.
AnswerD

Setting the leader region to Europe ensures writes are committed in Europe, reducing write latency for European users while maintaining strong consistency.

Why this answer

In Spanner multi-region, the leader region determines where writes are committed. To reduce write latency for European users, set the leader region to a European region (e.g., europe-west1). All writes will be committed in that region, reducing round-trip time for European clients.

This does not affect consistency; Spanner still provides strong consistency globally. Adding more read replicas in Europe does not affect write latency. Moving the application to Cloud SQL or Bigtable does not provide the same global strong consistency or may not meet requirements.

Page 11

Page 12 of 20

Page 13