Google Professional Cloud Database Engineer (PCDE) — Questions 601675

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

Page 8

Page 9 of 14

Page 10
601
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.

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

603
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

Smaller exports avoid timeout limits.

Why this answer

Option D is correct because 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. This approach leverages BigQuery's partitioned table structure to parallelize the export and avoid hitting the timeout threshold.

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.

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

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

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

607
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

Option A is correct. A composite index on (author_id, created_at) allows the database to efficiently find the posts for a given author ordered by created_at without scanning all rows. Option B (query cache) is not a schema change.

Option C (Spanner) is a different database. Option D (partitioning) could help but ordering across partitions is complex and not as effective.

608
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 here is that candidates assume a `parallel` keyword exists (like in GitHub Actions or GitLab CI) or misunderstand `waitFor` syntax, thinking 'previous' is a valid reference, when Cloud Build requires explicit step IDs or a dash to indicate no dependency.

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.

609
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

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

610
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

Option B is correct because a star schema with a fact table for sales and dimension tables for region and product is optimized for analytical queries in BigQuery. Option A is wrong because a flat table with all columns leads to higher storage costs and slower queries due to scanning unnecessary columns. Option C is wrong because a wide table with nested columns is better for hierarchical data, not for simple dimensional analysis.

Option D is wrong because a normalized schema with many joins is not ideal for BI queries and increases complexity.

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

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

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

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

615
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

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

616
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

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

The trap here is that candidates confuse `--min-instances` (which guarantees a baseline of running instances) with `--max-instances` (which limits scaling) or `--concurrency` (which controls per-instance request handling), 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.

617
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

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

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

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

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

621
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

Cisco often tests the distinction between Docker-based caching (which relies on the Docker daemon) and Kaniko's registry-based caching, leading candidates to mistakenly apply Docker-specific flags or workflows to Kaniko builds.

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.

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

623
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

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

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

624
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

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

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

626
MCQmedium

Which notification channel is supported by Cloud Monitoring for alerting without additional third-party integrations?

A.PagerDuty
B.Slack
C.SMS
D.Email
AnswerD

Email is a built-in notification channel in Cloud Monitoring.

627
Multi-Selecthard

An organization uses Terraform with a GCS backend for state. They want to implement a GitOps workflow where changes merged to the main branch are automatically applied. The CI/CD pipeline uses a service account with Workload Identity Federation. Which THREE components are required? (Choose three.)

Select 3 answers
A.A Cloud Storage bucket with object versioning enabled for Terraform state.
B.A Terraform Cloud workspace configured with the same GCS backend.
C.A service account with permissions to modify resources in the target projects.
D.A Git repository containing Terraform configurations.
E.A CI/CD system (e.g., Cloud Build) that runs Terraform plan and apply on merge to main.
AnswersC, D, E

The pipeline needs a service account with IAM roles to create/update resources.

Why this answer

GitOps requires a Git repository as the source of truth, a CI/CD pipeline that triggers on changes to main, and a service account with appropriate permissions to apply changes. Terraform Cloud is not required; the pipeline can run Terraform directly.

628
MCQhard

A Looker developer configured a new connection to BigQuery as shown. The connection test fails with the error above. What is the most likely cause?

A.The dataset mydataset does not exist in the project
B.The BigQuery query quota has been exceeded for the project
C.The Looker instance is located in a different region than the BigQuery dataset
D.The Looker service account lacks the required BigQuery roles on the dataset
AnswerD

The error 'Access Denied' indicates missing IAM permissions for the service account.

Why this answer

Option D is correct because the error indicates a permissions issue during the connection test. Looker uses a service account to authenticate to BigQuery, and if that service account lacks the required BigQuery roles (e.g., BigQuery Data Viewer, BigQuery Job User) on the dataset, the connection test will fail with an access denied error. The error message shown in the question (not provided here but implied) typically states 'Access Denied' or 'Permission denied' when the service account does not have the necessary IAM permissions on the dataset or project.

Exam trap

Google Cloud often tests the misconception that region mismatch causes connection failures, but BigQuery datasets are global and region does not affect authentication; the real issue is almost always IAM permissions on the service account.

How to eliminate wrong answers

Option A is wrong because if the dataset did not exist, the error would be 'Not found: Dataset myproject:mydataset' rather than a permissions error. Option B is wrong because exceeding the BigQuery query quota results in a 'Quota exceeded' error, not a permissions-related failure. Option C is wrong because BigQuery datasets are global resources and region mismatch does not cause connection test failures; Looker can connect to BigQuery datasets in any region as long as network connectivity exists.

629
MCQmedium

A company is designing a BigQuery data warehouse for BI dashboards. They have a fact table with billions of rows and need to optimize query performance for common filters on date and customer_id. Which table design strategy is most effective?

A.Use a clustered table on date only.
B.Use a non-partitioned table with indexing on customer_id.
C.Use a materialized view that aggregates by date.
D.Use a partitioned table on date with clustering on customer_id.
AnswerD

Partitioning prunes date ranges, clustering narrows scans within partitions.

Why this answer

Option D is correct because partitioning the table on `date` allows BigQuery to prune entire partitions when filtering by date, drastically reducing the data scanned. Clustering on `customer_id` then sorts data within each partition, enabling block-level pruning for queries that filter on `customer_id`. This combination minimizes both I/O and cost for the described BI workload.

Exam trap

The trap here is that candidates often assume clustering alone is sufficient for date-range filtering, overlooking that partitioning is required to physically separate data by date and enable partition pruning, which is a fundamental BigQuery optimization for time-series data.

How to eliminate wrong answers

Option A is wrong because clustering on `date` alone does not provide partition pruning; without partitioning, BigQuery must scan the entire table even if only a date range is needed, leading to higher costs and slower performance. Option B is wrong because BigQuery does not support traditional indexing; it uses columnar storage and pruning via partitioning/clustering, so a non-partitioned table with 'indexing' is not a valid strategy. Option C is wrong because a materialized view aggregating by date would pre-summarize data but cannot efficiently support ad-hoc filters on `customer_id` without scanning all underlying rows; it also adds storage and maintenance overhead without addressing the need for row-level filtering on `customer_id`.

630
MCQeasy

You are monitoring a Memorystore for Redis instance serving as a cache for an e-commerce application. The cache hit ratio has dropped from 95% to 70%. Which action is most likely to restore the hit ratio?

A.Reduce the network latency between the application and Redis by moving them to the same zone.
B.Change the eviction policy to 'noeviction' to prevent key removal.
C.Increase the maxmemory setting to accommodate more cache entries.
D.Enable AOF persistence to ensure data survives restarts.
AnswerC

Larger memory reduces evictions, improving hit ratio.

Why this answer

A drop in cache hit ratio from 95% to 70% indicates that the cache is evicting frequently accessed keys to make room for new ones. Increasing the maxmemory setting allows Redis to store more entries, reducing evictions and restoring the hit ratio. This is the most direct way to address the capacity issue without changing application behavior.

Exam trap

The trap here is that candidates confuse eviction policy changes (like 'noeviction') with capacity increases, or assume that persistence or network optimization can fix a hit ratio problem caused by insufficient memory.

How to eliminate wrong answers

Option A is wrong because network latency affects response times, not the cache hit ratio; moving to the same zone reduces latency but does not prevent evictions or increase the number of cached keys. Option B is wrong because setting 'noeviction' causes Redis to return errors on write operations when memory is full, which can break the application and does not restore existing evicted keys. Option D is wrong because AOF persistence ensures data durability across restarts but does not affect the eviction behavior or the number of keys in memory; it may even reduce available memory for caching due to overhead.

631
MCQeasy

A service has an SLO of 99.9% availability over a 30-day month. What is the error budget in minutes for that month?

A.43.2 minutes
B.144 minutes
C.4.32 minutes
D.432 minutes
AnswerA

Correct: 0.1% of 43,200 minutes = 43.2 minutes.

Why this answer

Error budget = (100% - SLO) * total time. 0.1% of 43,200 minutes (30 days) is 43.2 minutes. Rounded to 43 minutes.

632
MCQeasy

An engineer needs to create a build trigger in Cloud Build that runs every day at midnight. Which type of trigger should they use?

A.Push to branch trigger
B.Pull request trigger
C.Scheduled trigger
D.Manual trigger
AnswerC

Scheduled triggers run on a cron schedule.

Why this answer

Cloud Build supports scheduled triggers using a cron syntax. This allows running builds at specific times or intervals.

633
MCQhard

A company wants to implement a service mesh with fault injection for HTTP services running on Google Kubernetes Engine. They need to inject artificial delays and errors into requests to test resilience. Which GCP service should they use?

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

Traffic Director's HTTP fault filter can inject delays and errors.

Why this answer

Traffic Director is a managed traffic control plane that supports HTTP fault injection via the HTTP fault filter. It integrates with GKE ingress.

634
MCQeasy

A DevOps engineer wants to implement a GitOps workflow for a GKE cluster using a tool that automatically syncs the cluster state with a Git repository. Which Google Cloud service is designed for this purpose?

A.Cloud Run
B.Config Connector
C.Cloud Deploy
D.Config Sync
AnswerD

Config Sync is the GitOps tool for automatic sync.

Why this answer

Config Sync is the Google Cloud service specifically designed to implement a GitOps workflow for GKE clusters. It automatically synchronizes the cluster's desired state (as defined in a Git repository) with the actual cluster state, ensuring continuous reconciliation without manual intervention.

Exam trap

The trap here is confusing a deployment or CI/CD tool (like Cloud Deploy) with a GitOps sync tool, when the key differentiator is automatic, continuous reconciliation from a Git repository rather than one-time or event-driven deployments.

How to eliminate wrong answers

Option A is wrong because Cloud Run is a serverless compute platform for running containers, not a GitOps synchronization tool. Option B is wrong because Config Connector allows managing Google Cloud resources via Kubernetes custom resources but does not automatically sync cluster state from a Git repository. Option C is wrong because Cloud Deploy is a continuous delivery service for deploying to GKE and other targets, but it does not provide the continuous sync and drift detection that defines a GitOps workflow.

635
MCQhard

A financial services company uses Cloud Spanner with a database that has multiple tables with interleaved relationships. They need to enforce a strict consistency requirement across two related tables that are not interleaved. Which method ensures global strong consistency?

A.Use Spanner's built-in atomicity by executing the updates in a single read-write transaction.
B.Use Cloud Pub/Sub to eventually synchronize the tables.
C.Use a commit timestamp-based approach to synchronize writes.
D.Use a client-side distributed transaction across the two tables.
AnswerA

Spanner supports multi-table transactions with global strong consistency.

Why this answer

Cloud Spanner provides external consistency (global strong consistency) across all tables, interleaved or not, through the use of distributed read-write transactions that leverage the TrueTime API. By executing updates to both non-interleaved tables within a single read-write transaction, Spanner ensures that all mutations are applied atomically and are visible globally at a single timestamp, meeting the strict consistency requirement.

Exam trap

Cisco often tests the misconception that interleaved tables are required for strong consistency in Spanner, but the trap here is that Spanner's distributed transaction support works across any tables, interleaved or not, as long as they are within the same database.

How to eliminate wrong answers

Option B is wrong because Cloud Pub/Sub is an asynchronous messaging service that provides at-least-once delivery and eventual consistency, not strong consistency; it cannot guarantee that both tables are updated atomically. Option C is wrong because a commit timestamp-based approach, while useful for ordering, does not by itself provide atomicity across multiple tables; without a transaction, writes to separate tables can be interleaved or partially applied. Option D is wrong because client-side distributed transactions are not supported by Cloud Spanner; Spanner manages all transaction coordination internally using TrueTime and Paxos, and attempting to implement distributed transactions at the client level would violate Spanner's consistency guarantees and could lead to anomalies.

636
MCQhard

Refer to the exhibit. You notice replication latency is 15ms. What is the most likely cause of this latency?

A.The table load is not uniform
B.Storage utilization is at 70%
C.High CPU utilization (85%) on the cluster
D.The number of nodes is above the recommended count
AnswerC

High CPU can slow down replication operations.

Why this answer

High CPU utilization (85%) on the cluster is the most likely cause of replication latency because the replication process (often using protocols like Raft or Paxos in distributed databases) is CPU-intensive. When CPU resources are saturated, the cluster cannot process replication requests in a timely manner, leading to increased latency. In many distributed database systems, replication involves serialization, checksumming, and network I/O, all of which compete for CPU cycles.

Exam trap

Google Cloud often tests the misconception that storage utilization or node count are the primary causes of replication latency, when in fact CPU saturation is the most direct bottleneck for the replication protocol's processing pipeline.

How to eliminate wrong answers

Option A is wrong because non-uniform table load typically causes hot spots or uneven data distribution, which can lead to performance degradation but does not directly cause replication latency; replication latency is a cluster-wide issue related to the replication protocol's processing speed. Option B is wrong because storage utilization at 70% is within normal operational limits and does not directly impact replication latency; replication latency is more sensitive to CPU and network bandwidth than to storage capacity. Option D is wrong because the number of nodes being above the recommended count can increase network overhead and coordination delays, but the most direct and common cause of replication latency in a cluster with high CPU is CPU saturation, not node count alone.

637
MCQeasy

A team wants to reduce toil from manual database backups. They estimate the toil takes 10 hours per week. What is the maximum amount of toil they should allow to keep toil under 50% of their time according to SRE best practices?

A.5 hours per week
B.20 hours per week
C.40 hours per week
D.10 hours per week
AnswerB

50% of a 40-hour workweek is 20 hours. This is the maximum toil allowed by SRE best practices.

Why this answer

SRE best practices recommend that toil should not exceed 50% of an SRE team's time. If the team works 40 hours per week, 50% is 20 hours. Currently they spend 10 hours, which is under the cap.

638
MCQeasy

A startup is using Cloud Spanner for a global user base. They need to design a schema that minimizes interleaved table joins for common access patterns. Which schema design principle should they prioritize?

A.Normalize all tables to reduce data redundancy.
B.Store data in separate databases per region.
C.Use secondary indexes on all foreign key columns.
D.Use composite primary keys to colocate related data.
AnswerD

Correct. Composite primary keys enable interleaving, colocating rows and minimizing joins.

Why this answer

Option D is correct because Cloud Spanner uses interleaved tables to colocate parent and child rows physically on the same split, based on a shared prefix of the primary key. By designing composite primary keys that include the parent key as the leading column, related data is stored together, eliminating the need for distributed joins across nodes. This minimizes latency for common access patterns in a globally distributed database.

Exam trap

Cisco often tests the misconception that normalization or secondary indexes are always optimal for performance, but in Spanner's distributed architecture, physical colocation via interleaved composite keys is the critical design principle to avoid expensive cross-node joins.

How to eliminate wrong answers

Option A is wrong because normalizing tables increases the number of joins, which in Spanner can require cross-node communication and degrade performance; Spanner is optimized for denormalized, interleaved schemas. Option B is wrong because storing data in separate databases per region defeats Spanner's purpose of providing a single, globally consistent database with automatic replication and strong consistency. Option C is wrong because secondary indexes on foreign keys do not colocate data; they only speed up lookups but still require separate index scans and potential cross-split reads, whereas interleaving physically co-locates rows.

639
MCQmedium

A company runs a retail BI dashboard on BigQuery. The fact_sales table is partitioned by DAY and clustered by product_id. The table is 10 TB. Recently, analysts complain that queries filtering on a specific product_id and a month of data take over 10 minutes. The query uses a subquery to find top products. What should the engineer do?

A.Create a materialized view for the subquery.
B.Add an ORDER BY product_id to the subquery.
C.Change partition type to HOUR.
D.Re-cluster the table with product_id as the first clustering column and date as the second.
AnswerA

Materialized view stores precomputed results, reducing query time and cost.

Why this answer

Option A is correct because creating a materialized view for the subquery that identifies top products pre-computes and stores the results, which are incrementally refreshed by BigQuery. This avoids re-scanning the entire 10 TB fact_sales table each time the query runs, drastically reducing query time for the analysts' frequent filtering on product_id and a month of data.

Exam trap

Google Cloud often tests the misconception that clustering or partitioning changes alone can solve performance issues for subqueries, but the real bottleneck is the repeated full-table scan, which only a materialized view or similar pre-computation can eliminate.

How to eliminate wrong answers

Option B is wrong because adding ORDER BY product_id to the subquery does not improve performance; it only sorts the output, which adds overhead without reducing the data scanned or leveraging clustering. Option C is wrong because changing partition type to HOUR would create many small partitions, increasing partition management overhead and potentially degrading query performance due to metadata operations, while the analysts query a month of data, not hourly slices. Option D is wrong because re-clustering with product_id as the first clustering column and date as the second is already the current clustering order (product_id first, DAY partition second), so this change would not provide any benefit and clustering is automatically maintained by BigQuery.

640
MCQeasy

An e-commerce platform requires strong consistency across global regions. Which database service should they choose?

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

Cloud Spanner provides globally distributed strong consistency.

Why this answer

Cloud Spanner is the correct choice because it provides strong consistency across global regions via synchronous replication and TrueTime, ensuring ACID transactions with external consistency. This meets the e-commerce platform's requirement for globally consistent reads and writes without eventual consistency trade-offs.

Exam trap

The trap here is that candidates often confuse 'strong consistency' with 'eventual consistency' and pick Firestore for its real-time capabilities, overlooking that Firestore's multi-region mode sacrifices strong consistency for availability.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a NoSQL wide-column database designed for high-throughput analytical workloads, not strong consistency across regions—it offers only eventual consistency for replicated data. Option B is wrong because Firestore provides strong consistency within a single region but uses eventual consistency for multi-region deployments, failing the global strong consistency requirement. Option D is wrong because Cloud SQL is a regional relational database service that does not support multi-region replication with strong consistency; it relies on asynchronous replication for cross-region failover, which can lead to data loss or stale reads.

641
MCQhard

A team uses Terraform with a GCS backend for state. They want to use remote state from another project to read output values. What Terraform configuration element is used to retrieve outputs from a different state file?

A.`module.terraform_remote_state`
B.`output.terraform_remote_state`
C.`resource.terraform_remote_state`
D.`data.terraform_remote_state`
AnswerD

This data source fetches state from a remote backend.

Why this answer

The `data.terraform_remote_state` data source is the correct Terraform configuration element used to retrieve output values from a different state file stored in a remote backend, such as GCS. It reads the state data from the specified backend configuration and exposes the outputs via the `outputs` attribute, allowing cross-project or cross-workspace state access without requiring direct module dependencies.

Exam trap

Cisco often tests the distinction between `data` sources (read-only external data) and `resource` blocks (managed infrastructure), so the trap here is that candidates confuse `terraform_remote_state` as a resource or module, when it is specifically a data source designed for reading outputs from remote state files.

How to eliminate wrong answers

Option A is wrong because `module.terraform_remote_state` is not a valid Terraform construct; modules are defined with `module` blocks referencing module sources, not a built-in `terraform_remote_state` module. Option B is wrong because `output.terraform_remote_state` is not a valid resource or data source; outputs are declared with `output` blocks to expose values, not to retrieve remote state. Option C is wrong because `resource.terraform_remote_state` does not exist; Terraform uses `data` sources for read-only access to external state, not `resource` blocks which manage infrastructure lifecycle.

642
MCQhard

Your team is using Cloud Monitoring dashboards to monitor a multi-service architecture. You want to manage dashboards as code using Terraform. Which approach should you use to create a dashboard?

A.Use the Monitoring API directly from Terraform with a custom provider
B.Use the google_monitoring_dashboard Terraform resource with a dashboard JSON configuration
C.Create the dashboard manually and export it as a JSON file, then import into Terraform
D.Use gcloud alpha monitoring dashboards create command with a YAML file
AnswerB

This is the correct way to manage dashboards as code with Terraform.

Why this answer

Cloud Monitoring dashboards can be managed via the Dashboard API using a JSON configuration. Terraform has a google_monitoring_dashboard resource that accepts a JSON or YAML representation of the dashboard. The gcloud command only supports exporting/importing, not declarative management.

643
MCQmedium

During an incident, an SRE team uses an incident command system. Which role is responsible for coordinating communication and resources, but not for technical debugging?

A.Incident Commander
B.Subject Matter Expert
C.Operations Lead
D.Scribe
AnswerA

The IC coordinates the response, not technical debugging.

Why this answer

In incident command, the Incident Commander (IC) focuses on coordination, communication, and resource management, leaving technical debugging to the Operations Lead or other technical roles.

644
MCQeasy

A company is migrating their on-premises PostgreSQL database to Cloud SQL. They want to minimize downtime during the migration. Which approach should they use?

A.Use Database Migration Service with continuous replication
B.Use pg_dump and pg_restore
C.Export data to CSV and import into Cloud SQL
D.Use a third-party ETL tool
AnswerA

Database Migration Service supports continuous replication (CDC) to minimize downtime.

Why this answer

Database Migration Service (DMS) with continuous replication is the correct approach because it uses change data capture (CDC) to replicate ongoing transactions from the source PostgreSQL database to Cloud SQL, enabling a near-zero downtime migration. DMS handles schema conversion, data validation, and automated failover, which minimizes the cutover window to seconds or minutes.

Exam trap

The trap here is that candidates often assume any backup-and-restore method (like pg_dump) is sufficient for migration, but the PCDE exam specifically tests the requirement for minimal downtime, which only continuous replication can achieve.

How to eliminate wrong answers

Option B is wrong because pg_dump and pg_restore perform a logical backup and restore, which requires taking the source database offline or in read-only mode during the dump, causing significant downtime. Option C is wrong because exporting data to CSV and importing into Cloud SQL is a manual, batch-oriented process that does not support continuous replication, leading to extended downtime and potential data inconsistency. Option D is wrong because a third-party ETL tool typically extracts data in batches and cannot provide the continuous, low-latency replication needed for minimal downtime, and it introduces additional complexity and cost without native integration with Cloud SQL.

645
MCQeasy

A company plans to migrate an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB in size and requires minimal downtime. Which migration approach should they use?

A.Export the database using pg_dump and import into Cloud SQL using psql.
B.Use Datastream to stream data into Cloud SQL.
C.Use Database Migration Service with a continuous migration job.
D.Copy the data files to Cloud Storage and use gcloud to load into Bigtable.
AnswerC

Database Migration Service supports virtually zero-downtime migrations through continuous replication.

Why this answer

Database Migration Service (DMS) with a continuous migration job is the correct approach because it supports minimal-downtime migrations from on-premises PostgreSQL to Cloud SQL. DMS uses logical replication (via PostgreSQL's pgoutput plugin) to continuously sync changes from the source to the target, allowing a short cutover window. For a 2 TB database, this avoids the lengthy downtime required by a full dump-and-load method.

Exam trap

The trap here is that candidates may choose pg_dump (Option A) because it is familiar and works for smaller databases, but they overlook the minimal-downtime requirement and the impracticality of exporting 2 TB without significant service interruption.

How to eliminate wrong answers

Option A is wrong because pg_dump and psql require a full export and import, which would take hours or days for a 2 TB database, causing significant downtime. Option B is wrong because Datastream is designed for streaming change data capture (CDC) to BigQuery or Cloud Storage, not for direct ingestion into Cloud SQL. Option D is wrong because copying data files to Cloud Storage and loading into Bigtable is for NoSQL workloads, not for migrating a relational PostgreSQL database to Cloud SQL.

646
MCQmedium

Refer to the exhibit. The company wants to achieve a 99.99% SLA for this Cloud SQL instance. What should they do?

A.Change to a different tier.
B.Change the availability type to REGIONAL.
C.Enable automatic backups.
D.Increase the number of CPUs.
AnswerB

REGIONAL availability uses zonal replications and offers a 99.99% SLA.

Why this answer

A 99.99% SLA for Cloud SQL requires a regional (multi-zone) configuration to protect against a zonal failure. By changing the availability type to REGIONAL, the instance is provisioned with a synchronous standby in a different zone, enabling automatic failover and meeting the 99.99% uptime target. The default zonal availability only provides a 99.95% SLA.

Exam trap

Cisco often tests the distinction between availability (uptime) and durability (backups), so the trap here is that candidates confuse automatic backups (which protect data) with high availability (which protects uptime) and select Option C instead of the correct REGIONAL availability type.

How to eliminate wrong answers

Option A is wrong because changing the tier (e.g., from db-n1-standard to db-n1-highmem) affects performance and pricing but does not change the availability SLA; the SLA is tied to the availability type, not the machine tier. Option C is wrong because automatic backups protect against data loss (durability) but do not increase uptime; the SLA is about availability, not backup frequency. Option D is wrong because increasing the number of CPUs improves query performance but has no impact on the instance's availability SLA; the SLA is determined by the deployment configuration (zonal vs. regional), not by compute capacity.

647
MCQeasy

A healthcare company needs to run BI queries on patient data. The table is in BigQuery and contains 5 billion rows. Queries often filter on patient_id and date. But the table is not partitioned or clustered. Analysts run queries that scan the entire table. The data is updated daily. What is the most cost-effective way to improve performance?

A.Partition the table by patient_id.
B.Use a view that only selects recent data.
C.Cluster the table by date.
D.Partition by date and cluster by patient_id.
AnswerD

Partitioning prunes by date, clustering narrows by patient_id, reducing scanned bytes significantly.

Why this answer

Partitioning by date (e.g., ingestion or event date) allows BigQuery to prune entire partitions when queries filter on date, drastically reducing the data scanned. Clustering by patient_id within each partition further organizes the data so that queries filtering on patient_id can skip irrelevant blocks via block-level metadata. Together, this minimizes bytes billed and improves query performance without requiring table redesign or additional storage costs.

Exam trap

Google Cloud often tests the misconception that clustering alone is sufficient for performance gains, but without partitioning, clustering cannot prune storage at the partition level, so full-table scans still occur and costs remain high.

How to eliminate wrong answers

Option A is wrong because partitioning by patient_id is not supported in BigQuery (partitioning columns must be of type DATE, TIMESTAMP, or INTEGER range) and would not align with the common date-based filter pattern. Option B is wrong because a view that only selects recent data does not reduce the underlying table scan; BigQuery still processes all data in the table unless the view is materialized, and even then it would not address the full-table scan issue for historical queries. Option C is wrong because clustering alone without partitioning still requires scanning all partitions (the entire table) if no partition filter is applied; clustering only helps within a partition, so without a partition filter the query still incurs full-table costs.

648
MCQmedium

A Cloud Run service needs to handle background tasks after responding to a client. Which CPU configuration is required to ensure background tasks complete?

A.Set concurrency to 1
B.CPU always-on: false (default)
C.CPU always-on: true
D.Set execution environment to gen1
AnswerC

Background tasks require CPU to remain active after the response.

Why this answer

CPU always-on must be enabled for Cloud Run to run background tasks; otherwise, CPU is throttled after the request is handled.

649
Multi-Selectmedium

Which TWO best practices should be followed when modeling data for a Looker BI dashboard to optimize query performance?

Select 2 answers
A.Use derived tables for all complex logic
B.Use persistent derived tables (PDTs) to materialize intermediate results
C.Use native derived tables to leverage BigQuery's UDFs
D.Use materialized views in the underlying database
E.Use symmetric aggregates to correctly aggregate measures across joins
AnswersB, E

PDTs are stored and refreshed periodically, improving query speed.

Why this answer

Option B is correct because Persistent Derived Tables (PDTs) materialize intermediate query results into physical tables in the underlying database (e.g., BigQuery). This avoids re-executing complex logic on every user interaction, drastically reducing query latency and cost. PDTs are a core Looker optimization for repeated, heavy transformations.

Exam trap

Google Cloud often tests the distinction between persistent and native derived tables, trapping candidates who think all derived tables improve performance, when only persistent ones (PDTs) materialize results for repeated use.

650
Multi-Selectmedium

An SRE team wants to automate a manual process that involves multiple steps and conditional logic (e.g., if a backup fails, retry with a different method). Which TWO Google Cloud services can they use to orchestrate this workflow? (Choose 2 answers)

Select 2 answers
A.Pub/Sub
B.Cloud Composer
C.Cloud Functions
D.Cloud Workflows
E.Cloud Build
AnswersB, D

Cloud Composer (Airflow) can orchestrate complex DAGs with branching and retries.

Why this answer

Cloud Workflows and Cloud Composer (based on Apache Airflow) are both orchestration services that can handle complex workflows with branching, retries, and conditionals. Cloud Functions is for individual functions, Cloud Build is for CI/CD, and Pub/Sub is for messaging.

651
MCQhard

A team has a Cloud SQL instance with high CPU usage from many concurrent connections. They want to reduce connection overhead and improve performance. Which combination of services should they implement?

A.Cloud SQL Auth Proxy with PgBouncer
B.Use a network proxy like HAProxy
C.Cloud SQL Proxy with read replicas
D.Vertical scaling by increasing vCPU
AnswerA

Auth Proxy for secure tunneling, PgBouncer for connection pooling.

Why this answer

Cloud SQL Auth Proxy provides secure connections, and PgBouncer (connection pooler) manages a pool of connections to reduce overhead.

652
MCQmedium

You need to set up a notification channel for alerting that triggers a PagerDuty incident. The PagerDuty integration key is 'abc123'. What is the correct command to create this channel?

A.gcloud alpha monitoring channels create --type=slack --display-name="PagerDuty" --channel-labels=token=abc123
B.gcloud alpha monitoring channels create --type=pagerduty --display-name="PagerDuty" --channel-labels=auth_token=abc123
C.gcloud alpha monitoring channels create --type=pagerduty --display-name="PagerDuty" --channel-labels=service_key=abc123
D.gcloud beta monitoring channels create --type=webhook --display-name="PagerDuty" --channel-labels=url=https://events.pagerduty.com/integration/abc123/enqueue
AnswerC

Correct. This creates a PagerDuty notification channel with the integration key.

Why this answer

PagerDuty notification channels require the type 'pagerduty' and a 'service_key' (integration key) in the labels. The gcloud command is 'gcloud alpha monitoring channels create' with --type=pagerduty and --display-name and --channel-labels=service_key=... .

653
MCQeasy

A DevOps engineer wants to trigger a Cloud Build pipeline automatically every time a pull request is created against the main branch of a Cloud Source Repositories repository. Which type of build trigger should they configure?

A.Push trigger
B.Pull request trigger
C.Manual trigger
D.Scheduled trigger
AnswerB

Pull request triggers are designed to fire when a PR is created or updated against the specified branch.

Why this answer

Cloud Build supports pull request triggers that fire on PR creation or update. Manual triggers require human action, push triggers fire on branch commits, and scheduled triggers run on a cron schedule.

654
MCQhard

A company is migrating their on-premises data warehouse to BigQuery for BI. They have a fact table with billions of rows and many dimension tables. The current queries perform well in the on-prem system but are slow in BigQuery. The queries contain multiple JOINs and subqueries. Which optimization should they implement first?

A.Use clustering on all join keys.
B.Use BigQuery's automatic query rewriting.
C.Convert subqueries to CTEs.
D.Denormalize the dimension tables into the fact table.
AnswerD

Denormalization eliminates JOINs, which are expensive in BigQuery, improving performance significantly.

Why this answer

Denormalizing dimension tables into the fact table is the most impactful first optimization because it eliminates the need for expensive JOIN operations across billions of rows. In BigQuery, JOINs on large fact tables with multiple dimension tables can cause significant data shuffling and increased slot consumption, whereas denormalization reduces query complexity and leverages BigQuery's columnar storage and compression more efficiently. This directly addresses the root cause of slow performance in a BI workload where subqueries and JOINs are prevalent.

Exam trap

Google Cloud often tests the misconception that query-level optimizations (like clustering, CTEs, or automatic rewriting) can solve performance issues caused by schema design, when in fact the most impactful first step is to reduce JOIN complexity through denormalization for BigQuery's architecture.

How to eliminate wrong answers

Option A is wrong because clustering on all join keys does not eliminate the JOIN operations themselves; it only improves the efficiency of filtering and sorting within each table, but the shuffle and data redistribution required for JOINs across billions of rows remains a bottleneck. Option B is wrong because BigQuery's automatic query rewriting is a built-in optimizer that already applies heuristics and cost-based optimizations, but it cannot fundamentally restructure the schema to avoid JOINs; it works within the existing query structure. Option C is wrong because converting subqueries to CTEs (Common Table Expressions) is a syntactic change that does not alter the execution plan or reduce the computational cost of JOINs and subqueries; BigQuery treats CTEs similarly to subqueries under the hood.

655
MCQmedium

A team uses Kustomize to manage Kubernetes manifests for multiple environments (dev, staging, prod). They have a base directory and overlays for each environment. When deploying to a cluster, they run kustomize build and pipe to kubectl apply. How can they integrate this into Cloud Build?

A.Use a build step with image gcr.io/cloud-builders/kubectl and run kustomize build . | kubectl apply -f -.
B.Use a build step with image gcr.io/cloud-builders/kubectl and run kustomize build | kubectl apply --kustomize .
C.Use a build step with image gcr.io/k8s-skaffold/skaffold and run skaffold run.
D.Use a build step with image gcr.io/cloud-builders/kustomize and run kustomize build . | kubectl apply -f -.
AnswerD

The kustomize community builder includes kustomize. The output can be piped to kubectl apply.

Why this answer

Cloud Build can use the gcr.io/k8s-skaffold/skaffold image or the gcr.io/cloud-builders/kubectl image with kustomize built in. Alternatively, they can use the gcr.io/cloud-builders/kustomize community builder.

656
MCQmedium

A team has a service with an SLO of 99.5% uptime over 30 days. They track error budget and want to alert when the error budget is almost exhausted. What is their total error budget in minutes per month?

A.360 minutes
B.43.2 minutes
C.72 minutes
D.216 minutes
AnswerD

0.5% of 720 hours = 3.6 hours = 216 minutes.

Why this answer

Error budget = 100% - SLO = 0.5%. Over 30 days (720 hours), 0.5% of 720 hours = 3.6 hours = 216 minutes.

657
MCQeasy

A company is designing a data warehouse for BI. They need to support both detailed transaction analysis and high-level aggregated reports. Which schema design best balances storage and query performance?

A.Fully denormalized single table
B.Wide column store with no schema
C.Star schema with fact and dimension tables
D.Snowflake schema with normalized dimensions
AnswerC

Star schema is standard for BI, enabling fast aggregations and easy reporting.

Why this answer

The star schema is the optimal design for balancing storage and query performance in a BI data warehouse because it separates transactional data into fact tables (for detailed analysis) and dimension tables (for context), enabling fast aggregations via star joins while avoiding the storage overhead of full denormalization. This structure directly supports both granular transaction queries and high-level rollups without the complexity or performance penalty of snowflake schemas or the redundancy of fully denormalized tables.

Exam trap

Google Cloud often tests the misconception that snowflake schemas are always better for storage efficiency, but the trap here is that the question explicitly balances storage and query performance, and the star schema provides the best trade-off by avoiding excessive joins while keeping dimensions manageable.

How to eliminate wrong answers

Option A is wrong because a fully denormalized single table introduces massive data redundancy and update anomalies, leading to excessive storage consumption and slower query performance due to larger table scans, especially for high-level aggregations. Option B is wrong because a wide column store with no schema lacks the relational integrity and indexing capabilities required for efficient BI joins and aggregations, making it unsuitable for consistent, schema-on-write data warehouse workloads. Option D is wrong because a snowflake schema with normalized dimensions increases the number of join operations across multiple tables, degrading query performance for high-level reports without providing significant storage savings over a star schema in typical BI scenarios.

658
MCQmedium

A company runs a critical application on Cloud SQL for PostgreSQL. The database engineer needs to ensure that if the primary instance fails, a standby instance in a different region can take over with minimal data loss. Which configuration should the Database Engineer implement?

A.Set up a second Cloud SQL instance and configure application-level dual-writes to both instances.
B.Configure high availability (HA) within the same region using a regional persistent disk.
C.Create a cross-region replica with asynchronous replication and manually promote it during a disaster.
D.Create a cross-region replica with synchronous replication and enable automatic failover.
AnswerC

Cross-region replica with async replication is the standard DR configuration; manual promotion gives control.

Why this answer

Option C is correct because Cloud SQL for PostgreSQL supports cross-region replicas with asynchronous replication, which allows a standby instance in a different region to be promoted manually during a disaster. This minimizes data loss by replicating changes asynchronously, though some transactions may be lost if the primary fails before replication completes. Automatic failover is not supported for cross-region replicas in Cloud SQL, so manual promotion is required.

Exam trap

Google Cloud often tests the misconception that synchronous replication and automatic failover are available for cross-region replicas, but Cloud SQL only supports asynchronous replication for cross-region replicas and requires manual promotion.

How to eliminate wrong answers

Option A is wrong because application-level dual-writes introduce complexity, potential inconsistency, and do not leverage Cloud SQL's built-in replication, making it error-prone and not a standard disaster recovery solution. Option B is wrong because high availability (HA) within the same region using a regional persistent disk only protects against zonal failures, not regional disasters, and does not provide cross-region failover. Option D is wrong because Cloud SQL for PostgreSQL does not support synchronous replication for cross-region replicas, and automatic failover is not available for cross-region replicas; synchronous replication would also introduce unacceptable latency across regions.

659
MCQmedium

A company has a Google Cloud organization with separate folders for development, staging, and production. They want to deploy Terraform using a CI/CD pipeline that runs in a shared tools project. Where should the Terraform state files be stored and how should the pipeline authenticate?

A.Store state in Cloud Firestore; use a service account key stored in Secret Manager.
B.Store state in a Cloud Storage bucket in each environment project; use user credentials passed as secrets.
C.Store state in a central Cloud Storage bucket in the tools project; use a service account in the tools project with Workload Identity Federation to access the bucket and assume roles in environment projects.
D.Store state locally in the CI/CD runner; use Application Default Credentials from the runner's environment.
AnswerC

This is the recommended approach: central state bucket, and use a service account with Workload Identity Federation for secure, keyless authentication.

Why this answer

Terraform state should be stored in a GCS bucket with versioning enabled. The pipeline should use a service account from the tools project with Workload Identity Federation to access the bucket. This avoids long-lived keys and follows security best practices.

660
Multi-Selectmedium

Which TWO schema design practices help reduce write contention in Cloud Spanner?

Select 2 answers
A.Use a hash prefix in the primary key to distribute writes across splits.
B.Use a timestamp prefix in the primary key to sort by time.
C.Use interleaved tables to keep related rows together.
D.Design the schema so that hot rows are split into multiple rows with different keys.
E.Decrease the number of splits by using a less granular primary key.
AnswersA, D

Hashing prevents sequential writes from hitting the same split.

Why this answer

Option A is correct because using a hash prefix in the primary key distributes write operations uniformly across multiple splits (tablets). Cloud Spanner splits data based on key ranges; without a hash prefix, sequential writes (e.g., monotonically increasing keys) concentrate on a single split, causing hot spots and write contention. A hash prefix ensures that each new row lands on a different split, balancing the write load.

Exam trap

The trap here is that candidates often confuse 'sorting by time' (Option B) with good performance, not realizing that Cloud Spanner's key-range-based splitting punishes sequential writes, whereas hash-based distribution is required to avoid hot spots.

661
MCQhard

A Bigtable instance stores time-series data with row keys formatted as `#deviceID#timestamp`. The application often queries recent data for a specific device. Monitoring shows high read latency when scanning multiple devices. The row key design is causing hotspotting. What is the best redesign?

A.Use separate tables per device.
B.Use a hash prefix before deviceID.
C.Store timestamps in column qualifiers.
D.Prefix the row key with the deviceID and reverse the timestamp.
AnswerB

Hashing distributes rows evenly across the keyspace, alleviating hotspotting while preserving locality for device queries.

Why this answer

Option B is correct because prepending a hash prefix (e.g., a cryptographic hash of the deviceID) to the row key distributes writes and reads evenly across Bigtable tablets, eliminating hotspotting caused by sequential deviceID-based keys. This ensures that queries for recent data (which would otherwise concentrate on a single tablet) are spread across multiple nodes, reducing read latency.

Exam trap

Google Cloud often tests the misconception that reversing the timestamp (option D) solves hotspotting, but candidates fail to realize that the leading key component (deviceID) is still sequential, so all recent data for a device remains on the same tablet, and only a hash prefix (option B) truly distributes the load.

How to eliminate wrong answers

Option A is wrong because using separate tables per device does not solve hotspotting; it merely shifts the problem to table-level contention and increases operational overhead, as Bigtable is optimized for a single wide table, not many small tables. Option C is wrong because storing timestamps in column qualifiers does not address row key hotspotting; it only changes the schema structure without distributing the load, and queries still scan the same hot row key range. Option D is wrong because prefixing with deviceID and reversing the timestamp still results in sequential deviceID-based keys, which cause hotspotting; reversing the timestamp only helps if the deviceID is already distributed, but here the deviceID is the leading component, so all recent data for a device still falls on the same tablet.

662
MCQmedium

A DevOps engineer needs to deploy the same application to multiple GKE clusters across environments (dev, staging, prod) with environment-specific configurations. They want to use a single source of truth for Kubernetes manifests. Which approach is most suitable?

A.Use Helm charts with separate values files per environment
B.Use kubectl apply with different manifest files for each environment
C.Use Config Connector to manage GKE clusters
D.Use Kustomize with overlays for each environment
AnswerD

Kustomize overlays inherit base and override specifics, ideal for environment-specific configs.

Why this answer

Kustomize is the most suitable approach because it allows you to maintain a single base set of Kubernetes manifests and apply environment-specific overlays (dev, staging, prod) without templating. This aligns with the requirement for a single source of truth while enabling environment-specific configurations through patches and transformers, all managed natively by kubectl.

Exam trap

The trap here is that candidates often confuse Helm's templating with a single source of truth, but the question explicitly requires a single source of truth for Kubernetes manifests, not templates, making Kustomize's overlay approach the correct choice.

How to eliminate wrong answers

Option A is wrong because Helm charts introduce a templating language that can lead to complexity and drift from raw Kubernetes manifests, and separate values files still require managing a template engine, which is not a single source of truth for the manifests themselves. Option B is wrong because using different manifest files for each environment violates the single source of truth principle, leading to duplication and potential drift between environments. Option C is wrong because Config Connector is designed for managing Google Cloud resources (like GKE clusters) declaratively, not for deploying applications with environment-specific configurations to existing clusters.

663
Multi-Selecteasy

Which TWO of the following are best practices when designing data structures for business intelligence in BigQuery?

Select 2 answers
A.Partition tables on a column that aligns with common filter criteria
B.Store raw logs directly in fact tables without any aggregation
C.Use NULLable columns extensively to save storage
D.Use a single wide table for all data to simplify schema
E.Denormalize dimension attributes into fact tables to reduce joins
AnswersA, E

Partitioning limits scanned partitions.

Why this answer

Partitioning tables on a column that aligns with common filter criteria (e.g., a date or timestamp column) allows BigQuery to prune partitions during query execution, drastically reducing the amount of data scanned and improving query performance and cost efficiency. This is a core best practice for optimizing BI workloads in BigQuery.

Exam trap

Google Cloud often tests the misconception that denormalization is always bad, but in BigQuery for BI, denormalizing dimension attributes into fact tables is a recognized best practice to reduce JOIN overhead and improve query performance.

664
MCQhard

A slow query log entry shows the above for a Cloud SQL for MySQL instance. Which index would most improve performance?

A.Index on products(product_id)
B.Index on orders(order_date)
C.Composite index on orders(product_id, order_date)
D.Composite index on orders(order_date, product_id)
AnswerC

This index allows the join to quickly find matching product_ids and then apply the date range, reducing the number of rows examined.

Why this answer

The query likely filters or joins on product_id and then sorts or filters by order_date, so a composite index on orders(product_id, order_date) allows the database to satisfy both conditions with a single index scan, avoiding a filesort or extra lookups. In MySQL, a composite index with the most selective column first (product_id) followed by the range/order column (order_date) is optimal for queries that filter on product_id and then order or filter by order_date.

Exam trap

Google Cloud often tests the leftmost prefix rule and the importance of column order in composite indexes, trapping candidates who think any composite index covering both columns is equally effective regardless of column order.

How to eliminate wrong answers

Option A is wrong because indexing only product_id on the products table does not help with filtering or ordering on the orders table's order_date column, and the query likely involves the orders table. Option B is wrong because indexing only order_date on orders does not help with filtering on product_id, which is typically the more selective filter. Option D is wrong because a composite index on orders(order_date, product_id) would be less efficient if the query filters on product_id first, as MySQL cannot use the second column of the index when the first column is not used in a equality condition, leading to a full index scan or extra sorting.

665
MCQhard

A service has an SLO of 99.9% availability over 30 days. In the first 10 days, the service has already consumed 60% of the error budget. Which action best aligns with SRE principles?

A.Ignore the budget and continue deploying as usual
B.Extend the SLO window to 60 days to dilute the budget
C.Declare a change freeze and focus on improving reliability
D.Increase the SLO to 99.99% to tighten reliability
AnswerC

Slowing or freezing changes preserves error budget for remaining period.

Why this answer

With high error budget consumption early, the team should throttle new releases to avoid exhausting the budget. This is a typical SRE practice: if error budget is nearly depleted, slow down changes.

666
MCQmedium

A company is using Cloud Run to deploy a service that processes background tasks. The service takes a few seconds to initialize, and users experience high latency on cold starts. How can the company eliminate cold starts for this service?

A.Set the minimum number of instances to a value based on the baseline traffic.
B.Set the maximum number of instances to a higher value.
C.Use the gen1 execution environment.
D.Set the concurrency to 1.
AnswerA

Min instances keep instances warm, eliminating cold starts for the configured number of instances.

Why this answer

Setting a minimum number of instances ensures that at least that many instances are always running and ready to serve requests, eliminating cold starts.

667
MCQhard

A company uses Cloud Memorystore for Redis as a cache for their web application. They want to ensure that cache data survives a failover event with minimal data loss. The current instance has a standard tier (with replication) and persistence disabled. What change should they make?

A.Switch to the basic tier without replication but with high memory.
B.Enable persistence (AOF) on the instance.
C.Increase the instance memory size to hold more data.
D.Add a read replica to the instance.
AnswerB

Persistence ensures data is written to disk and can be recovered after failover.

Why this answer

Enabling AOF (Append-Only File) persistence on a Cloud Memorystore for Redis standard tier instance ensures that write operations are durably logged to disk. In the event of a failover, the promoted replica can replay the AOF to recover the most recent writes, minimizing data loss beyond what the default in-memory replication provides.

Exam trap

The trap here is that candidates assume replication alone guarantees data durability, but replication only copies data in memory and does not protect against loss of uncommitted writes during a failover without disk-based persistence enabled.

How to eliminate wrong answers

Option A is wrong because switching to the basic tier removes replication entirely, which increases the risk of data loss during any failure and does not address persistence. Option C is wrong because increasing memory size only allows more data to be cached in RAM, but does not make that data durable across a failover event. Option D is wrong because adding a read replica does not enable persistence; replicas in standard tier already exist for high availability, but without AOF they still lose data on failover if persistence is disabled.

668
MCQeasy

Refer to the exhibit. You are analyzing a slow query in Cloud SQL for PostgreSQL. The execution plan shows a sequential scan. Which index should you create to most effectively improve query performance?

A.CREATE INDEX idx_orders_partial ON orders(created_at) WHERE user_id = 123;
B.CREATE INDEX idx_orders_created_at ON orders(created_at);
C.CREATE INDEX idx_orders_created_user ON orders(created_at, user_id);
D.CREATE INDEX idx_orders_user_created ON orders(user_id, created_at);
AnswerD

Allows index seek on user_id then range scan on created_at.

Why this answer

Option D is correct because the query likely filters on `user_id` and then sorts or filters by `created_at`. A composite index on `(user_id, created_at)` allows PostgreSQL to first narrow down by `user_id` using index seek, then efficiently access rows in `created_at` order, avoiding a sequential scan. This matches the most common pattern for slow queries involving equality on `user_id` and range or ordering on `created_at`.

Exam trap

Google Cloud often tests the misconception that any composite index with the right columns will work, but the column order matters critically — candidates pick `(created_at, user_id)` thinking it covers both, not realizing the leading column must match the equality filter for optimal performance.

How to eliminate wrong answers

Option A is wrong because a partial index with a hardcoded `user_id = 123` only benefits queries for that specific user, not the general slow query; it also ignores the `created_at` column needed for ordering or filtering. Option B is wrong because an index on `created_at` alone does not help if the query filters on `user_id` first — PostgreSQL may still perform a sequential scan or need to filter many rows. Option C is wrong because the column order `(created_at, user_id)` is suboptimal: if the query filters on `user_id` (equality) and then orders by `created_at`, the leading column should be `user_id` to allow index seek; leading with `created_at` forces a full index scan or inefficient filtering.

669
MCQeasy

A team executed the above DDL to create interleaved tables in Cloud Spanner. They need to query all orders for a specific customer. Which query will be most efficient?

A.SELECT * FROM Orders WHERE CustomerId = 1234 AND OrderDate = '2023-01-01';
B.SELECT * FROM Customers JOIN Orders ON Customers.CustomerId = Orders.CustomerId WHERE Customers.CustomerId = 1234;
C.SELECT * FROM Orders WHERE CustomerId = 1234;
D.SELECT * FROM Orders WHERE OrderId = 5678;
AnswerC

Interleaving colocates all orders for a customer, making this query very efficient.

Why this answer

Option C is correct because in Cloud Spanner, interleaved tables store child rows physically adjacent to their parent row within the same split. Querying Orders directly on the interleaved key (CustomerId) allows Spanner to perform a local index scan within the parent row's split, avoiding a distributed cross-table join. This leverages the interleaved table's physical clustering for the most efficient retrieval.

Exam trap

Cisco often tests the misconception that an explicit JOIN is required for interleaved tables, but the correct approach is to query the child table directly using the parent key, as the interleaved structure already enforces the relationship without a join.

How to eliminate wrong answers

Option A is wrong because adding an extra filter on OrderDate does not improve efficiency; it may force a full scan of the Orders table if no secondary index exists on (CustomerId, OrderDate), and the query still benefits from the interleaved structure but the additional predicate is unnecessary and could mislead the optimizer. Option B is wrong because it performs an explicit JOIN between Customers and Orders, which in Spanner requires a distributed cross-table lookup even though the tables are interleaved; the join is redundant since the interleaved key already provides the parent-child relationship, and it adds network overhead. Option D is wrong because filtering by OrderId alone does not use the interleaved key (CustomerId), so Spanner must scan the entire Orders table or rely on a secondary index, which is less efficient than a direct interleaved key lookup.

670
MCQeasy

You want to continuously profile the CPU usage of a production application running on Compute Engine to identify performance bottlenecks. Which Google Cloud service should you use?

A.Cloud Trace
B.Cloud Monitoring
C.Cloud Profiler
D.Error Reporting
AnswerC

Cloud Profiler is designed for continuous profiling of CPU, heap, threads, and contention.

Why this answer

Cloud Profiler provides continuous, low-overhead profiling for CPU, heap, threads, and contention. It uses statistical sampling and presents results in flame graphs. Cloud Trace is for distributed tracing, not profiling.

671
Multi-Selectmedium

You are troubleshooting a slow-performing query on Cloud Spanner. The query scans a large table with a secondary index. Which TWO metrics from the Query Insights dashboard would most directly indicate the source of the performance issue?

Select 2 answers
A.CPU time
B.Rows scanned
C.Storage utilization
D.Commit latency
E.Lock wait time
AnswersA, B

High CPU time indicates the query is computationally expensive.

Why this answer

CPU time (A) is correct because high CPU usage indicates that the query is performing expensive operations like sorting, joining, or complex filtering, which can slow performance even if the index is used. Rows scanned (B) is correct because scanning a large number of rows, even with a secondary index, suggests the index is not selective enough or the query is retrieving many rows, leading to excessive I/O and latency. Both metrics directly point to query execution inefficiency.

Exam trap

Google Cloud often tests the distinction between metrics that indicate query execution inefficiency (CPU time, rows scanned) versus metrics related to storage or write contention, leading candidates to mistakenly select storage utilization or lock wait time for a read-only query performance issue.

672
MCQeasy

A company is using Cloud Deploy to manage releases to GKE. They want to implement a deployment strategy where the new version is rolled out to a small subset of pods and traffic is gradually shifted based on prometheus metrics. Which deployment strategy should they configure in the delivery pipeline?

A.Blue/green strategy
B.Canary strategy
C.Rolling update strategy
D.Standard strategy
AnswerB

Canary strategy allows gradual traffic shifting and can use metrics for automated promotion.

Why this answer

B is correct because a canary strategy in Cloud Deploy allows you to gradually shift traffic to the new version based on Prometheus metrics, enabling fine-grained control and automated rollback if the metrics indicate degradation. This aligns with the requirement to roll out to a small subset of pods and shift traffic based on metrics.

Exam trap

The trap here is that candidates often confuse 'canary' with 'rolling update' because both involve incremental changes, but rolling updates do not support metric-based traffic shifting or fine-grained percentage control, which is the key differentiator in Cloud Deploy.

How to eliminate wrong answers

Option A is wrong because a blue/green strategy deploys the new version to a completely separate environment (green) and then switches all traffic at once, which does not support gradual traffic shifting based on Prometheus metrics. Option C is wrong because a rolling update strategy replaces pods incrementally but does not natively support traffic splitting based on external metrics like Prometheus; it relies on Kubernetes' default rolling update behavior. Option D is wrong because 'Standard strategy' is not a recognized deployment strategy in Cloud Deploy; the valid strategies are canary, blue/green, and rolling.

673
MCQmedium

The user runs a BigQuery query on a non-partitioned table and receives the error shown. Which optimization should be applied first to resolve the issue?

A.Partition the table by the event_date column
B.Increase the BigQuery reservation slot count
C.Create a materialized view that pre-aggregates the data
D.Cluster the table by event_date
AnswerA

Partitioning limits scans to relevant date ranges, reducing resource consumption.

Why this answer

The error indicates that the query is scanning too much data, likely exceeding the free tier or slot quota. Partitioning the non-partitioned table by `event_date` allows BigQuery to perform partition pruning, scanning only the relevant date range instead of the entire table. This directly reduces the data processed, which is the most effective first optimization for cost and performance.

Exam trap

Google Cloud often tests the distinction between partitioning (which prunes entire storage shards) and clustering (which only sorts within shards), leading candidates to mistakenly choose clustering as a solution for reducing data scanned when partitioning is required first.

How to eliminate wrong answers

Option B is wrong because increasing the reservation slot count only adds compute resources but does not reduce the amount of data scanned; the query would still fail if the issue is data volume limits. Option C is wrong because creating a materialized view pre-aggregates data but still requires scanning the base table unless the view is used with query rewriting, and it does not address the root cause of scanning too much raw data. Option D is wrong because clustering by `event_date` improves query performance by reducing the data read for range-based filters, but it does not enable partition pruning; clustering only sorts data within partitions, and without partitioning, the entire table is still scanned.

674
MCQmedium

An organization wants to deploy a Cloud Run service using Cloud Deploy. They need to run a database migration script before each new revision starts serving traffic. Which Cloud Deploy feature should they use?

A.Use a Cloud Build step in the delivery pipeline
B.Configure a preDeploy hook that runs a Cloud Run Job
C.Add a manual approval gate before deployment
D.Use a postDeploy hook to run the migration after traffic is switched
AnswerB

PreDeploy hooks run before the new revision is deployed, allowing database migrations or other preparation.

Why this answer

Cloud Deploy supports deployment hooks that execute Cloud Run Jobs before (preDeploy) or after (postDeploy) a rollout. PreDeploy hooks run before the new revision starts serving traffic, making them ideal for database migrations.

675
MCQhard

Refer to the exhibit. A company creates these Cloud Spanner tables. What happens when a customer record is deleted?

A.The deletion fails if there are orders.
B.The orders are deleted only if the order date is older than 30 days.
C.All orders for that customer are automatically deleted.
D.The orders remain orphaned.
AnswerC

Cascade delete removes all child rows associated with the deleted parent row.

Why this answer

Option C is correct because Cloud Spanner enforces referential integrity through interleaved tables. When a parent row in the Customers table is deleted, all child rows in the Orders table that are interleaved under that customer are automatically deleted via a cascading delete. This behavior is inherent to the interleaved table structure, not an explicit ON DELETE CASCADE clause.

Exam trap

The trap here is that candidates may assume Cloud Spanner behaves like traditional relational databases (e.g., requiring explicit ON DELETE CASCADE or failing on foreign key violations), but interleaved tables automatically cascade deletes without any additional syntax.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner interleaved tables automatically delete child rows, so the deletion does not fail even if orders exist. Option B is wrong because there is no time-based condition in the table schema; deletion of orders is unconditional and not filtered by order date. Option D is wrong because orphaned rows cannot occur in interleaved tables; the parent-child relationship ensures child rows are removed when the parent is deleted.

Page 8

Page 9 of 14

Page 10