Courseiva

Google Professional Cloud Database Engineer (PCDE) — Questions 451525

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

Page 6

Page 7 of 20

Page 8
451
MCQmedium

A company uses Cloud SQL for MySQL to run an e-commerce application. They need to ensure that they can recover the database to any point within the last 4 days. They also want to minimize storage costs. Which configuration should they use?

A.Enable automated backups with a 4-day retention schedule.
B.Enable binary logging with the 'log_bin' flag and set the transaction log retention to 4 days in the backup configuration.
C.Enable binary logging and set the transaction log retention to 4 days. Disable automated backups.
D.Enable point-in-time recovery by setting the 'point_in_time_recovery' flag to true with a 4-day window.
AnswerB

Correct! Binary logging enables PITR, and setting transaction log retention to 4 days allows recovery to any point within the last 4 days.

Why this answer

Point-in-time recovery (PITR) in Cloud SQL for MySQL requires binary logging, which can be enabled with the 'log_bin' flag. The transaction log retention period can be set from 1 to 7 days. For 4-day recovery, set the retention to 4 days.

Option B is correct: enable binary logging and set the transaction log retention to 4 days. Option A is wrong because automated backups alone only restore to backup time, not any point. Option C is wrong because disabling automated backups is not necessary—automated backups are still needed for initial restore points, but PITR uses transaction logs.

Option D is wrong because point-in-time recovery is enabled by setting binary logging and retention; there is no separate 'point_in_time_recovery' flag.

452
MCQmedium

A company is migrating a relational database to Cloud Bigtable. The source schema has a customers table and an orders table with a foreign key. Which data model approach is recommended for Bigtable?

A.Create a view to join the tables
B.Maintain two separate tables with foreign keys
C.Use Cloud Spanner to maintain relational structure
D.Denormalize and store orders as a column family within the customer row
AnswerD

Denormalization is typical in Bigtable to read all related data in one row.

Why this answer

Bigtable is a wide-column NoSQL database, so denormalization is recommended to avoid joins. Embedding order data within customer rows (or using a single table with composite keys) is common. Referential integrity is not enforced.

453
MCQmedium

A startup uses Memorystore for Redis as a session store. They are concerned about losing session data if the instance fails. Which option provides the best durability for session data without significant application changes?

A.Increase the maxmemory setting to store more data
B.Take regular snapshots of the instance using gcloud commands
C.Enable Redis persistence (RDB/AOF) on the Memorystore instance
D.Configure a cross-region replica to provide high availability
AnswerD

Cross-region replicas provide failover capability, protecting against zone/regional failures with minimal application changes.

Why this answer

Configuring a cross-region replica in Memorystore for Redis provides high availability and durability by replicating data asynchronously to a replica instance in a different region. If the primary instance fails, the replica can be promoted, minimizing session data loss without requiring significant application changes, as the application continues to connect to the same endpoint or a new primary endpoint.

Exam trap

A common misconception in this exam is that enabling persistence (RDB/AOF) provides high availability and durability against instance failures, when in reality persistence only protects against data loss on restart and does not provide automatic failover or cross-region resilience.

How to eliminate wrong answers

Option A is wrong because increasing the maxmemory setting only allows more data to be stored in memory but does not provide any durability or protection against data loss if the instance fails; it simply expands the available memory capacity. Option B is wrong because taking regular snapshots using gcloud commands is a manual, external backup process that does not provide automatic failover or real-time durability; it introduces operational overhead and potential data loss between snapshots, and it requires application changes to handle failover. Option C is wrong because enabling Redis persistence (RDB/AOF) on a Memorystore instance provides local disk-based persistence but does not protect against instance-level failures (e.g., zone or regional outages) and can introduce performance overhead; it also does not offer automatic failover, and the application would still experience downtime during recovery.

454
Multi-Selecteasy

A BigQuery dataset contains a table with a STRUCT column for customer address. The BI team needs to query the city field from the struct. Which two approaches are valid? (Select TWO).

Select 2 answers
A.SELECT UNNEST(address) as city FROM table
B.SELECT JSON_EXTRACT(TO_JSON(address), '$.city') FROM table
C.SELECT address.city FROM table
D.SELECT address['city'] FROM table
E.SELECT address.city.standard FROM table
AnswersB, C

Converting the struct to JSON and extracting the city field is a valid but more verbose method.

Why this answer

`JSON_EXTRACT(TO_JSON(address), '$.city')` converts the STRUCT to a JSON string and then extracts the `city` field using JSONPath syntax. Option C is correct because BigQuery allows direct field access on a STRUCT column using dot notation (`address.city`), which is the standard SQL syntax for nested fields.

Exam trap

Google Cloud often tests the distinction between STRUCT and ARRAY types, and the trap here is that candidates confuse `UNNEST` (for ARRAYs) with dot notation (for STRUCTs), or mistakenly apply bracket syntax from other SQL dialects like PostgreSQL or MySQL.

455
MCQmedium

A gaming company uses Memorystore for Redis to cache player session data. They need to ensure high availability with automatic failover in case of a zone failure. Which configuration should the Database Engineer choose?

A.Deploy a Standard tier Redis instance with replication across two zones.
B.Deploy a Basic tier Redis instance with multiple read replicas.
C.Deploy a Memcached cluster with multiple nodes.
D.Deploy a Basic tier Redis instance in a single zone.
AnswerA

Standard tier provides replication and automatic failover.

Why this answer

Memorystore for Redis Standard tier provides cross-zone replication with automatic failover, ensuring high availability during a zone failure. The Standard tier uses a primary and replica instance in different zones, and if the primary fails, the replica is automatically promoted. This meets the requirement for automatic failover without manual intervention.

Exam trap

Google Cloud often tests the distinction between Basic and Standard tiers in Memorystore for Redis, where candidates mistakenly assume Basic tier offers replication or failover, but it is a single-node configuration with no high availability.

How to eliminate wrong answers

Option B is wrong because the Basic tier (Standard tier in some contexts) does not support replication or automatic failover; it is a single-node instance with no high availability. Option C is wrong because Memcached is a distributed memory caching system, not a Redis instance, and does not provide the same data persistence or failover mechanisms required for session data. Option D is wrong because a Basic tier Redis instance in a single zone offers no redundancy; any zone failure would cause complete data loss and downtime.

456
MCQhard

An organization uses Binary Authorization with Container Analysis to enforce that only images that have passed vulnerability scanning and have been signed by an approved authority can be deployed to GKE. A DevOps engineer notices that an unsigned image is still being deployed. What is the most likely cause?

A.The Build service account does not have the signer role.
B.The image is stored in a different project than the one where Binary Authorization is configured.
C.The Container Analysis API is not enabled in the project.
D.The Binary Authorization admission controller is not enabled on the GKE cluster.
AnswerD

Without the admission controller, the BinAuthz policy is not enforced.

Why this answer

Binary Authorization enforcement requires the admission controller to be enabled on the GKE cluster. Without the admission controller, the cluster will not intercept pod creation requests to verify image attestations, so unsigned images can be deployed regardless of the Binary Authorization policy configuration.

Exam trap

Google often tests the misconception that configuring a Binary Authorization policy alone is sufficient, when in fact the admission controller must be enabled on the GKE cluster for enforcement to take effect.

How to eliminate wrong answers

Option A is wrong because the Build service account lacking the signer role would prevent images from being signed, but it does not cause an unsigned image to bypass enforcement—the admission controller would still block it. Option B is wrong because Binary Authorization policies can be applied across projects using the same Container Analysis notes and attestors; storing the image in a different project does not inherently bypass enforcement. Option C is wrong because the Container Analysis API must be enabled for vulnerability scanning and attestation storage, but its absence would cause scanning or attestation failures, not allow unsigned images to be deployed if the admission controller is active.

457
Multi-Selecthard

A company is migrating a large Oracle database to Cloud Spanner. They need to define the schema for relational tables with foreign keys. Which THREE considerations are important when designing the Spanner schema? (Choose three.)

Select 3 answers
A.Use NULL values in primary key columns to allow optional fields.
B.Use INTERLEAVE tables to model parent-child relationships.
C.Avoid using composite primary keys; use single-column keys instead.
D.Define secondary indexes for querying on non-key columns.
E.Foreign keys are automatically enforced in Cloud Spanner.
AnswersB, D, E

Interleaving allows co-locating parent and child rows, reducing read latency.

Why this answer

Options B, D, and E are correct. Interleaved tables (B) model parent-child relationships and optimize joins and data locality. Secondary indexes (D) are essential for efficient queries on non-key columns.

Cloud Spanner enforces foreign key constraints (E) to maintain referential integrity. Option A is incorrect because primary key columns cannot be NULL. Option C is incorrect because composite primary keys are commonly used in Spanner.

458
MCQeasy

A company wants to enforce that all Cloud Run services must not be publicly accessible. They need a preventive control rather than a detective one. Which approach should they use?

A.Use Cloud Audit Logs to monitor for public Cloud Run services and alert the security team.
B.Create a custom IAM role that denies the run.services.create permission.
C.Configure VPC Service Controls to restrict Cloud Run access to within the VPC.
D.Apply an organization policy with constraint 'constraints/run.allowedIngress' set to 'Internal and Cloud Load Balancing'.
AnswerD

This policy prevents services from being publicly accessible at creation time.

Why this answer

Organization policies provide preventive controls. The 'constraints/run.allowedIngress' policy can be set to 'Internal' or 'Internal and Cloud Load Balancing' to prevent public access. IAM roles can be used to grant/revoke access but are not preventive for resource configuration.

459
MCQmedium

A company runs near-real-time dashboards on BigQuery that query a table partitioned by day and clustered by user_id. The most common query filters on user_id and then aggregates sales over the last 7 days. However, many queries still scan full partitions. What is the most likely cause?

A.The dashboard is configured to refresh every 5 minutes, causing too many queries.
B.The table uses a wide-column schema with many repeated fields.
C.The table is partitioned by hour, not by day.
D.The table is not clustered on user_id, or the clustering expression does not match the filter.
AnswerD

Clustering on user_id allows BigQuery to prune blocks within partitions when filtering on that column.

Why this answer

The most common cause of full partition scans despite partitioning by day and clustering by user_id is that the clustering expression does not match the filter predicate. In BigQuery, clustering only prunes blocks within a partition when the filter column exactly matches the clustering key; if the filter uses a different expression (e.g., a cast or function) or if clustering is not properly defined, BigQuery falls back to scanning the entire partition. This results in the described behavior where queries still scan full partitions even though the table is partitioned and clustered.

Exam trap

Google Cloud often tests the misconception that partitioning alone guarantees query efficiency, but the trap here is that clustering must exactly match the filter predicate to avoid full partition scans, and candidates may overlook the need for precise column matching in the WHERE clause.

How to eliminate wrong answers

Option A is wrong because query frequency (every 5 minutes) does not cause full partition scans; it may increase slot contention or cost but does not affect the pruning behavior of partitioning or clustering. Option B is wrong because wide-column schemas with repeated fields can increase storage and processing overhead but do not prevent partition pruning or clustering from working correctly; the issue is about filter matching, not schema complexity. Option C is wrong because the question explicitly states the table is partitioned by day, so partitioning by hour would be a different configuration; even if it were hourly, the core problem of full partition scans would still point to clustering mismatch, not the partition granularity.

460
MCQmedium

A company uses Cloud Firestore in Datastore mode for a multi-tenant SaaS application. Each tenant has a separate namespace. The application has grown rapidly, and the database engineer notices that write throughput is degrading. Monitoring shows that the number of writes per second is high but within Firestore limits. However, the latency for writes is increasing linearly with the number of tenants. The engineer suspects that index management is causing the problem. The current schema uses automatic indexes for all properties. What is the best corrective action?

A.Disable automatic indexing and create custom composite indexes only for queries that require them.
B.Implement a data retention policy to delete old tenant data.
C.Request a throughput increase from Google Cloud support.
D.Shard tenants into separate Firestore databases to distribute the write load.
AnswerA

Automatic indexing causes every property to be indexed, resulting in excessive write operations. Custom indexes reduce write amplification.

Why this answer

Automatic indexing in Firestore in Datastore mode creates an index for every property, which causes write amplification as each write must update all relevant indexes. With many tenants in separate namespaces, the number of indexes grows linearly with tenants, increasing write latency. Disabling automatic indexing and creating custom composite indexes only for needed queries reduces the index write overhead, restoring write throughput.

Exam trap

The trap here is that candidates may assume the issue is throughput capacity (Option C) or data volume (Option B), rather than recognizing that automatic indexing creates a write amplification problem that scales with schema complexity and tenant count.

How to eliminate wrong answers

Option B is wrong because implementing a data retention policy to delete old tenant data reduces storage but does not address the root cause of write latency increasing with tenant count due to index management overhead. Option C is wrong because requesting a throughput increase from Google Cloud support does not resolve the index write amplification issue; Firestore writes are already within limits, and the bottleneck is index-related, not capacity. Option D is wrong because sharding tenants into separate Firestore databases distributes the write load but does not eliminate the per-property automatic indexing overhead within each database; it also adds operational complexity and cost without fixing the core index management problem.

461
MCQmedium

A developer wants to use Cloud Build to deploy a container to Cloud Run. They have written a cloudbuild.yaml file with a step that runs gcloud run deploy. The build fails with a permission error. What is the most likely cause?

A.The gcloud command is incorrect
B.The Cloud Build trigger is misconfigured
C.The Cloud Run API is not enabled in the project
D.The Cloud Build service account does not have the Cloud Run Admin role
AnswerD

Cloud Build uses a service account to perform actions; it needs roles/run.admin to deploy to Cloud Run.

462
MCQeasy

A startup is building a BI system on Cloud SQL (PostgreSQL) for small-to-medium datasets. The data warehouse includes a fact table 'sales_fact' with millions of rows and dimension tables. The BI team reports that 'sales_fact' queries are slow despite proper indexing. What design change would most likely improve performance?

A.Use a read replica to offload queries
B.Denormalize frequently joined dimension columns into the fact table
C.Switch to Cloud Spanner for better scalability
D.Add more indexes on every column used in WHERE clauses
AnswerB

This reduces the number of joins needed for BI queries.

Why this answer

Denormalizing frequently joined dimension columns into the fact table reduces the number of JOIN operations required for BI queries. In PostgreSQL on Cloud SQL, even with proper indexing, JOINs between a large fact table and multiple dimension tables can cause significant overhead due to tuple reconstruction and buffer pool churn. By storing commonly accessed dimension attributes directly in the fact table, queries become single-table scans or index lookups, dramatically reducing query latency for small-to-medium datasets.

Exam trap

Google Cloud often tests the misconception that more indexes or read replicas universally solve query performance issues, when in fact the root cause is often the JOIN overhead in star-schema designs, which denormalization directly addresses.

How to eliminate wrong answers

Option A is wrong because a read replica offloads read traffic but does not improve the performance of individual queries; the replica runs the same slow query plan on the same schema. Option C is wrong because Cloud Spanner is designed for globally distributed, horizontally scalable workloads with strong consistency, not for optimizing star-schema JOIN performance on small-to-medium datasets; it introduces higher latency and cost without addressing the JOIN overhead. Option D is wrong because adding more indexes on every column used in WHERE clauses can lead to index bloat, increased write overhead, and the query planner may still choose sequential scans or inefficient index joins if the fact table is large and the WHERE clauses are not selective enough.

463
Multi-Selectmedium

A company is migrating a Teradata data warehouse to BigQuery. They need to convert Teradata DDL and BTEQ scripts to BigQuery-compatible SQL. Which TWO services or tools should they use? (Choose 2 correct answers.)

Select 2 answers
A.Schema Conversion Tool (SCTS)
B.Dataflow
C.Cloud Dataproc
D.BigQuery Migration Assessment
E.BigQuery Data Transfer Service
AnswersA, E

SCTS converts DDL and scripts from Teradata to BigQuery.

Why this answer

Schema Conversion Tool (SCTS) is used to convert Teradata DDL to BigQuery DDL. BigQuery Data Transfer Service can be used to load data from Teradata into BigQuery. BigQuery Migration Assessment is for discovery, not conversion.

Dataflow and Dataproc are not specialized for Teradata schema conversion.

464
MCQmedium

The exhibit shows query metadata for a query that scans 10 GB. Given the table is 100 GB and partitioned by hire_date, why did the query scan 10 GB and not less?

A.The filter on hire_date is not selective enough to prune most partitions
B.Clustering on department is not being used because the query has ORDER BY
C.The query uses GROUP BY, which forces a full table scan
D.The table is not clustered properly
AnswerA

Correct. The filter on hire_date is not selective enough to prune most partitions, so 10 GB are scanned.

Why this answer

Partition pruning in Google BigQuery depends on the selectivity of the filter predicate. If the filter on `hire_date` matches a large number of partitions (e.g., filtering on a range that covers 10 GB out of 100 GB), the query scans exactly those partitions. The table is 100 GB and partitioned by `hire_date`, so a 10 GB scan implies the filter pruned 90 GB of partitions but was not selective enough to reduce the scan further—e.g., the predicate may be a broad range or lack a precise equality condition.

Exam trap

Google Cloud often tests the misconception that any filter on a partition column automatically prunes to a minimal scan, ignoring that the selectivity of the predicate (e.g., range vs. equality) determines how many partitions are actually skipped.

How to eliminate wrong answers

Option B is wrong because clustering on `department` is unrelated to partition pruning; clustering improves data skipping for non-partition columns, but the query's `ORDER BY` does not disable clustering benefits—it may even leverage them for sorting. Option C is wrong because `GROUP BY` does not force a full table scan in Databricks; partition pruning occurs before aggregation, so if the filter is selective, only relevant partitions are scanned. Option D is wrong because the table is partitioned by `hire_date`, and the scan size (10 GB) is consistent with proper partitioning; improper clustering would affect data skipping, not the partition-level scan size.

465
MCQmedium

A company uses Cloud Build to build Docker images. They want to cache intermediate layers to speed up subsequent builds. The build runs on a private pool with access to Artifact Registry. Which caching approach should they use?

A.Use Google Cloud Build's built-in image optimization feature.
B.Enable Cloud Build's automatic caching by setting cache: true in cloudbuild.yaml.
C.Configure Docker cache import/export steps in cloudbuild.yaml.
D.Use Kaniko with the --cache-repo flag pointing to an Artifact Registry repository.
AnswerD

Kaniko's layer caching with --cache-repo stores cache in a remote registry, which is the recommended approach.

Why this answer

Kaniko is the recommended tool for building Docker images in Cloud Build when using private pools, as it does not require a Docker daemon and supports layer caching via the `--cache-repo` flag. By pointing this flag to an Artifact Registry repository, Kaniko can push and pull cached intermediate layers, significantly speeding up subsequent builds. This approach works seamlessly with private pools and Artifact Registry, unlike the other options which are either invalid or not supported.

Exam trap

The trap here is that candidates assume Cloud Build has a simple built-in caching toggle (like `cache: true`) or that Docker's native cache-from/cache-to is directly usable in Cloud Build, when in reality Kaniko is the standard solution for caching in daemonless environments like private pools.

How to eliminate wrong answers

Option A is wrong because Cloud Build does not have a built-in 'image optimization feature' that caches intermediate layers; this is a generic term not tied to any actual Cloud Build capability. Option B is wrong because `cache: true` is not a valid field in `cloudbuild.yaml`; Cloud Build does not support an automatic caching flag of that nature. Option C is wrong because Docker cache import/export steps (e.g., `--cache-from` and `--cache-to`) require a Docker daemon, which is not available in Cloud Build's default execution environment, especially on private pools, and they are not natively supported as build steps without custom scripting.

466
MCQhard

You are a cloud database engineer for a financial services firm. The firm uses Cloud SQL for PostgreSQL to support a BI reporting tool. The main table 'transactions' has 500 million rows and is growing daily. Reports often run aggregations over date ranges and group by account_id. The 'transactions' table has indexes on date and account_id separately. Despite these indexes, the reporting queries are slow, often taking over 30 minutes. The database is deployed on a high-memory machine with 32 vCPUs and 256 GB RAM. You notice that the queries perform sequential scans instead of using indexes. What is the most likely reason, and what single change would you make to improve performance?

A.Partition the table by date using PostgreSQL declarative partitioning
B.Create a composite index on (date, account_id)
C.Increase the shared_buffers setting to 128 GB
D.Disable sequential scans by setting enable_seqscan = off
AnswerB

A composite index that matches the query's WHERE and GROUP BY can drastically reduce the data scanned.

Why this answer

The reporting queries filter by date ranges and group by account_id, but the existing separate indexes on date and account_id cannot be combined efficiently for both conditions. PostgreSQL's query planner often chooses a sequential scan over using two separate indexes because it estimates that reading the entire table is cheaper than the bitmap scan overhead of combining them. A composite index on (date, account_id) allows the database to directly locate rows matching the date range and then access them in account_id order, eliminating the need for a separate sort or join step.

Exam trap

Google Cloud often tests the misconception that adding separate indexes on each column is sufficient for multi-column queries, but the trap here is that PostgreSQL cannot efficiently combine separate indexes for both filtering and grouping without a composite index that matches the query's access pattern.

How to eliminate wrong answers

Option A is wrong because partitioning by date would only help if queries consistently filter on a single partition boundary, but the slow queries also group by account_id, and partitioning does not directly improve grouping performance without additional indexing. Option C is wrong because increasing shared_buffers beyond a certain point (e.g., 128 GB on a 256 GB machine) can cause PostgreSQL to spend more time managing the buffer pool and may lead to reduced performance due to kernel-level caching overhead; the issue is index usage, not memory size. Option D is wrong because disabling sequential scans with enable_seqscan = off is a dangerous global setting that can force the planner to use inefficient index scans even when a sequential scan would be faster, and it does not address the root cause of missing a suitable composite index.

467
Drag & Dropmedium

Order the steps to migrate an on-premises MySQL database to Cloud SQL using Database Migration Service (DMS).

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

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

Why this order

First prepare source, then create connection profile, create migration job, start migration, and finally promote.

468
MCQhard

A financial services company uses BigQuery to run complex analytical queries on trading data. They notice that a particular query joining a large fact table (10 TB) with a small dimension table (100 MB) is slow. The fact table is partitioned by date and clustered by symbol. The dimension table is not partitioned. The query filters on a specific date range and a few symbols. Which optimization is MOST likely to improve query performance?

A.Denormalize the dimension table into the fact table.
B.Enable automatic query rewriting to use clustering keys for pruning on the dimension table join.
C.Partition the dimension table by its primary key.
D.Cluster the dimension table on its primary key.
AnswerB

This allows BigQuery to prune clusters in the fact table based on the join condition with the dimension table.

Why this answer

BigQuery's automatic query rewriting can leverage clustering keys from the fact table to prune the join, even though the dimension table is not clustered. When the query filters on a specific date range and symbols, BigQuery can use the fact table's clustering on symbol to skip irrelevant blocks during the join, reducing data scanned and improving performance. This optimization is automatic and does not require manual denormalization or repartitioning.

Exam trap

The trap here is that candidates assume clustering or partitioning must be applied to both tables in a join, when in fact BigQuery can use clustering from only the large fact table to prune the join, making options C and D unnecessary and option A an over-engineered solution.

How to eliminate wrong answers

Option A is wrong because denormalizing a 100 MB dimension table into a 10 TB fact table would massively increase storage and processing costs, and is unnecessary when clustering and pruning can achieve the same performance gain without data duplication. Option C is wrong because partitioning the dimension table by its primary key would create many small partitions (e.g., one per row), which is inefficient and does not help with join pruning; BigQuery partitions are best for date-based or integer-range pruning, not for high-cardinality keys. Option D is wrong because clustering the dimension table on its primary key would not improve the join performance significantly, as the dimension table is already small (100 MB) and the bottleneck is scanning the large fact table; clustering is most beneficial on large tables to reduce the amount of data read during filtering and joins.

469
MCQmedium

A company uses Memorystore for Redis with the 'volatile-lru' eviction policy. They notice that recently added keys with TTL are being evicted even though there is still memory available. What is the most likely cause?

A.The volatile-lru policy evicts only keys with an expiry set, and there are many keys without expiry occupying memory
B.The allkeys-lru policy would be more appropriate
C.The maxmemory setting is not configured
D.The maxmemory-policy is misconfigured
AnswerA

volatile-lru evicts only keys with TTL. If many non-volatile keys consume memory, volatile keys may be evicted even if overall memory appears free.

Why this answer

The 'volatile-lru' eviction policy in Memorystore for Redis evicts only keys that have a TTL (expiry) set, using an LRU (Least Recently Used) algorithm among those keys. If many keys without expiry are consuming memory, the eviction process will still target only the volatile keys, even if overall memory is not fully exhausted, because the policy is constrained to evict only from the subset of keys with TTLs. This explains why recently added keys with TTL are being evicted prematurely — the non-volatile keys are 'protected' from eviction, forcing the eviction of volatile keys to free memory.

Exam trap

A common misconception is that 'volatile-lru' evicts all keys when memory is low, but in fact it only evicts keys with TTLs, leaving non-volatile keys untouched even if they consume the majority of memory.

How to eliminate wrong answers

Option B is wrong because 'allkeys-lru' would evict any key (including those without expiry) based on LRU, which would not specifically cause the eviction of recently added TTL keys if memory is still available; the issue here is that non-volatile keys are occupying memory and not being evicted, not that the policy is too aggressive. Option C is wrong because if 'maxmemory' were not configured, Redis would use unlimited memory and no eviction would occur at all, contradicting the observation that eviction is happening. Option D is wrong because the 'maxmemory-policy' is correctly set to 'volatile-lru' as stated; the misconfiguration is not in the policy itself but in the understanding that this policy only evicts volatile keys, which is the intended behavior.

470
MCQeasy

A BI developer is designing a BigQuery dataset for a sales dashboard. Which column naming convention is considered a best practice for column names in BI reports?

A.Use names with spaces (e.g., Total Revenue).
B.Use descriptive, snake_case names (e.g., total_revenue).
C.Use short, cryptic abbreviations (e.g., tr).
D.Use camelCase names (e.g., totalRevenue).
AnswerB

Snake_case is readable and avoids quoting issues.

Why this answer

BigQuery column names are case-insensitive but must follow standard SQL naming rules. Using descriptive snake_case (e.g., total_revenue) improves readability, avoids ambiguity, and is consistent with BigQuery's own system tables and best practices for BI tools like Looker or Tableau, which often expect clean, underscore-separated identifiers.

Exam trap

Google Cloud often tests the misconception that spaces or camelCase are acceptable for readability, but the trap is that BigQuery requires backtick quoting for spaces and does not enforce a specific case convention, making snake_case the safest and most portable choice for BI reporting.

How to eliminate wrong answers

Option A is wrong because spaces in column names require backtick quoting (e.g., `Total Revenue`) in BigQuery SQL, which adds unnecessary complexity and can break automated queries or BI tool integrations. Option C is wrong because short, cryptic abbreviations (e.g., tr) reduce clarity and maintainability, making it difficult for other developers or business users to understand the data without external documentation. Option D is wrong because camelCase (e.g., totalRevenue) is not a standard convention in BigQuery; while technically allowed, it can cause confusion with case-insensitive comparisons and is less readable in SQL than snake_case.

471
Multi-Selectmedium

A company uses BigQuery to run business intelligence reports. The data engineer needs to implement a star schema for a sales data warehouse. Which THREE are best practices when designing the tables?

Select 3 answers
A.Use natural keys in dimension tables for simplicity
B.Use a primary key on fact tables to enforce uniqueness
C.Store pre-aggregated data in dimension tables
D.Denormalize dimension tables to include descriptive attributes
E.Partition fact tables by date and cluster by frequently filtered columns
AnswersB, D, E

Ensures each row is unique and allows efficient joins.

Why this answer

In BigQuery, fact tables should have a primary key to enforce uniqueness of each sales transaction, preventing duplicate rows that would skew aggregations like SUM or COUNT. BigQuery does not enforce primary keys natively, but defining them in the schema (e.g., using PRIMARY KEY constraint in DDL) allows the query engine to optimize joins and deduplication, especially when using MERGE statements. This ensures data integrity in the star schema.

Exam trap

Google Cloud often tests the misconception that dimension tables should be highly normalized or contain pre-aggregated data, but the PCDE exam emphasizes denormalizing dimensions for BI readability and storing aggregates only in fact tables or materialized views.

472
Multi-Selectmedium

A manufacturing company uses Cloud SQL for PostgreSQL for its inventory system. The database has grown and now experiences high read latency. The team wants to improve read performance without changing application code. Which THREE actions should they consider? (Choose 3)

Select 3 answers
A.Add read replicas
B.Create appropriate indexes based on query patterns
C.Migrate to Cloud Spanner
D.Implement database sharding
E.Increase the instance's memory allocation
AnswersA, B, E

Offloads read traffic from the primary instance.

Why this answer

Adding read replicas spreads read load, appropriate indexing speeds up queries, and increasing instance memory improves cache hit ratio. Sharding would require application changes.

473
Matchingmedium

Match each Cloud SQL tier to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Burstable, low-cost for small workloads

Shared-core, moderate performance

Standard machine with 1 vCPU and 3.75 GB RAM

High memory machine with 2 vCPUs and 13 GB RAM

High CPU machine with 4 vCPUs and 3.6 GB RAM

Why these pairings

Cloud SQL tiers are defined by vCPU and memory. Common confusions arise when swapping memory-heavy and compute-heavy tiers, or mixing vCPU counts. Ensure you match the exact specifications for each tier.

474
MCQmedium

A DevOps engineer wants to monitor the CPU utilization of a Compute Engine instance and receive an alert if it exceeds 80% for more than 5 minutes. Which type of metric should be used in the alerting condition?

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

CPU utilization is a gauge metric that represents a value at a point in time.

475
MCQmedium

A company wants to enforce that only container images signed by their CI/CD pipeline can be deployed to GKE. Which two services should they use together?

A.Binary Authorization and Container Analysis
B.Cloud Build and Artifact Registry
C.Security Command Center and Artifact Registry
D.Cloud Deploy and Cloud Run
AnswerA

Binary Authorization enforces policies, Container Analysis stores attestations.

Why this answer

Binary Authorization enforces that only container images signed by trusted authorities (like a CI/CD pipeline) can be deployed to GKE. Container Analysis (now part of Artifact Analysis) scans images for vulnerabilities and stores attestations, which Binary Authorization uses to verify signatures before allowing deployment. Together, they provide a complete enforcement chain: signing during CI/CD and verification at deploy time.

Exam trap

Candidates often confuse image storage (Artifact Registry) or build automation (Cloud Build) with deployment enforcement, but a separate attestation and admission control service (Binary Authorization) is required.

How to eliminate wrong answers

Option B is wrong because Cloud Build and Artifact Registry handle building and storing images, but neither enforces deployment policies based on image signatures; they lack the attestation verification component. Option C is wrong because Security Command Center provides threat detection and compliance monitoring, not image signing or deployment enforcement; Artifact Registry stores images but does not verify signatures at deploy time. Option D is wrong because Cloud Deploy is a continuous delivery service for GKE and Cloud Run, but it does not natively enforce image signing; Cloud Run is a serverless compute platform, not a signing or attestation service.

476
MCQhard

You are running a Cloud Bigtable instance for time-series data ingestion. Write throughput has dropped significantly, and you see an increase in 'resource exhausted' errors. The table has one column family and one rowkey format: `#orgId#deviceId#timestamp`. After analyzing cluster metrics, you see that one node is handling most of the traffic. What is the most likely cause?

A.The column family design is creating too many columns.
B.The rowkey design is causing hotspotting on one tablet node due to a prefix (orgId) being written heavily.
C.The cluster does not have enough nodes.
D.The timestamp is too granular, causing many rows with the same timestamp.
AnswerB

If one orgId dominates writes, all writes go to a single tablet.

Why this answer

The rowkey design `#orgId#deviceId#timestamp` causes hotspotting because all writes for a given `orgId` are directed to a single tablet node. Cloud Bigtable partitions data by rowkey range, and sequential or heavily skewed prefixes (like `orgId`) concentrate write traffic on one node, leading to 'resource exhausted' errors and throughput degradation.

Exam trap

Google Cloud often tests the misconception that scaling nodes (Option C) solves performance issues, but the real problem is rowkey design causing uneven load distribution, which cannot be fixed by adding nodes alone.

How to eliminate wrong answers

Option A is wrong because the number of columns in a column family does not cause hotspotting or node-level traffic imbalance; column family design affects storage and read patterns, not write distribution. Option C is wrong because adding more nodes would not fix the root cause—hotspotting—since all writes for the same `orgId` would still target the same node regardless of cluster size. Option D is wrong because timestamp granularity affects row uniqueness, not write distribution; multiple rows with the same timestamp do not cause one node to handle most traffic.

477
Multi-Selectmedium

A company uses Pub/Sub for event-driven processing and wants to ensure exactly-once delivery for critical messages. Which TWO configurations are required? (Choose two.)

Select 2 answers
A.Use multiple subscriber instances to increase throughput.
B.Set the acknowledgement deadline to 600 seconds.
C.Disable flow control to allow unlimited messages.
D.Enable message ordering on the subscription.
E.Set a maximum retention duration of 7 days.
AnswersD, E

Ordering is required for exactly-once delivery as per Pub/Sub documentation.

Why this answer

For exactly-once delivery in Google Cloud Pub/Sub, the only required configuration is to enable the 'exactly-once delivery' flag on the subscription. This option is not listed. Message ordering and maximum retention duration are not prerequisites for exactly-once delivery.

None of the provided options are necessary for exactly-once delivery.

478
MCQeasy

Refer to the exhibit. A company wants to perform point-in-time recovery (PITR) for their Cloud SQL MySQL instance. Is PITR enabled?

A.No, because PITR requires the backupConfiguration to have 'pointInTimeRecoveryEnabled: true'.
B.Yes, because binaryLogEnabled is true.
C.No, because transactionLogRetentionDays is set to 7.
D.Yes, because enabled is true.
AnswerB

Binary logs are used for MySQL PITR; their presence indicates PITR is enabled.

Why this answer

Cloud SQL MySQL uses binary logging to enable point-in-time recovery (PITR). When `binaryLogEnabled` is set to `true`, the instance logs all changes, allowing restoration to any specific point within the configured transaction log retention period. The `pointInTimeRecoveryEnabled` field is not a valid Cloud SQL configuration parameter; instead, PITR is implicitly enabled when binary logging is active.

Exam trap

The trap here is that candidates confuse the `enabled` field (for automated backups) with PITR, or assume a separate `pointInTimeRecoveryEnabled` flag exists, when in fact Cloud SQL ties PITR directly to binary logging.

How to eliminate wrong answers

Option A is wrong because `pointInTimeRecoveryEnabled` is not a recognized field in Cloud SQL's backupConfiguration; PITR is controlled by `binaryLogEnabled`. Option C is wrong because `transactionLogRetentionDays` being set to 7 does not disable PITR; it defines how long binary logs are retained, and PITR works within that window. Option D is wrong because `enabled` refers to automated backups, not PITR; automated backups and binary logging are separate settings.

479
Multi-Selecthard

During a cutover from MySQL to Cloud SQL, the team must minimize downtime. Which THREE steps are essential for a successful cutover with minimal data loss?

Select 3 answers
A.Verify that DMS replication lag is zero.
B.Quiesce all write operations to the source database.
C.Promote the destination Cloud SQL instance.
D.Enable point-in-time recovery on the destination.
E.Take a full backup of the source after quiescing.
AnswersA, B, C

Ensures all changes are replicated before promotion.

Why this answer

Quiesce writes to stop changes, verify replication lag is zero to ensure all changes are applied, then promote the destination to make it writable. Updating connection strings and testing are also needed but the three essential steps for data integrity are quiescing, verifying lag, and promoting.

480
MCQhard

A company uses Cloud Build to deploy to Cloud Run. They need to test a new revision with a specific tag without serving any live traffic. After validation, they want to shift 10% of traffic to the new revision. Which two gcloud commands should they use?

A.gcloud run deploy --image ... --no-traffic --tag=test; gcloud run services update-traffic ... --to-revisions=test=10
B.gcloud run deploy --image ... --no-traffic; gcloud run services update-traffic ... --to-latest=10
C.gcloud run deploy --image ... --traffic=10%; gcloud run revisions delete
D.gcloud run deploy --image ... --tag=test; gcloud run services update-traffic ... --to-revisions=test=100
AnswerA

Correct sequence: deploy without traffic and tag, then update traffic split.

Why this answer

The `--no-traffic` flag deploys the new revision without routing any live traffic to it, while `--tag=test` assigns a specific tag (e.g., 'test') that allows direct URL-based validation. The second command `gcloud run services update-traffic --to-revisions=test=10` then shifts exactly 10% of traffic to that tagged revision, enabling a gradual rollout. This two-step approach ensures the revision is validated before receiving production traffic.

Exam trap

Google often tests the distinction between deploying with `--no-traffic` (zero traffic) versus `--traffic=X%` (immediate traffic), and the requirement to use `--tag` for URL-based validation before traffic shifting.

How to eliminate wrong answers

Option B is wrong because `--to-latest=10` is not a valid syntax; `--to-latest` expects a percentage but it would route traffic to the latest deployed revision (which might not be the tagged one) and does not use a tag for validation. Option C is wrong because `--traffic=10%` deploys the revision and immediately sends 10% of traffic to it, bypassing the requirement to test without any live traffic first; `gcloud run revisions delete` is unrelated and would remove revisions, not shift traffic. Option D is wrong because `--to-revisions=test=100` sends 100% of traffic to the tagged revision, not the required 10% shift.

481
MCQmedium

A team is designing a relational schema for a new application on Cloud SQL. The schema includes a table 'Orders' and a table 'Customers'. Each order belongs to one customer. The team anticipates high write throughput and needs to enforce referential integrity. Which schema design is most appropriate?

A.Use Cloud Spanner interleaved tables with Orders as a child of Customers
B.Implement referential integrity checks in the application code and omit database constraints
C.Store order data as a JSON array in a column of the Customers table
D.Use a foreign key constraint from Orders.customer_id to Customers.customer_id
AnswerD

Enforces integrity efficiently within the database.

Why this answer

Using a foreign key constraint from Orders.customer_id to Customers.customer_id enforces referential integrity at the database level, which is essential for maintaining data consistency in a relational schema. Cloud SQL (e.g., MySQL or PostgreSQL) natively supports foreign key constraints, ensuring that every order references an existing customer without relying on application logic. This approach is efficient for high write throughput as the database handles the check atomically, avoiding race conditions.

Exam trap

Google Cloud often tests the misconception that application-level checks are sufficient for high-throughput systems, but the trap here is that database-level foreign keys are the only way to guarantee referential integrity under concurrent writes, as application code cannot prevent race conditions or orphaned records.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner interleaved tables are designed for hierarchical data and strong consistency in a globally distributed environment, not for standard relational schemas on Cloud SQL; they also introduce complexity and cost that are unnecessary for a simple parent-child relationship. Option B is wrong because implementing referential integrity checks in application code is error-prone and cannot guarantee consistency under high write throughput, as concurrent writes can bypass application logic, leading to orphaned records. Option C is wrong because storing order data as a JSON array in a column of the Customers table violates normalization principles, making it difficult to query individual orders, enforce constraints, and scale write throughput efficiently.

482
Multi-Selecthard

A company wants to implement Binary Authorization for containers deployed to GKE. They need to ensure that only images signed by their internal CI system are allowed to run. Which three components are required?

Select 3 answers
A.An attestor in Binary Authorization
B.Image signing using a private key
C.Cloud Build with privilege escalation mode
D.Binary Authorization policy configured to require attestations
E.Container Registry with vulnerability scanning enabled
AnswersA, B, D

The attestor verifies the signature and creates an attestation that the policy uses.

Why this answer

Binary Authorization requires images to be signed (e.g., using Cloud Key Management Service or Signify), an attestor that verifies signatures, and an admission controller (Binary Authorization) that enforces the policy on the cluster.

483
MCQmedium

An organization wants to restrict the creation of Cloud SQL instances outside of specific regions. Which organization policy constraint should they use?

A.`compute.requireShieldedVm`
B.`iam.disableServiceAccountKeyCreation`
C.`sql.restrictPublicIp`
D.`resourceLocations`
AnswerD

This constraint restricts resource creation to specified locations.

Why this answer

The `resourceLocations` constraint is the correct organization policy to restrict Cloud SQL instance creation to specific regions. This policy defines a list of allowed locations (e.g., `us-central1`, `europe-west1`) where all resources, including Cloud SQL instances, can be created. By setting this constraint at the organization, folder, or project level, any attempt to create a Cloud SQL instance outside the permitted regions will be denied.

Exam trap

The trap here is that candidates often confuse location-based restrictions with network-level controls (like public IP restrictions) or security-focused policies (like Shielded VM), failing to recognize that `resourceLocations` is the generic policy for controlling where any resource can be deployed.

How to eliminate wrong answers

Option A is wrong because `compute.requireShieldedVm` is a constraint that enforces Shielded VM features on Compute Engine instances, not a location restriction for Cloud SQL. Option B is wrong because `iam.disableServiceAccountKeyCreation` prevents the creation of service account keys, which is unrelated to controlling where Cloud SQL instances are deployed. Option C is wrong because `sql.restrictPublicIp` controls whether Cloud SQL instances can have public IP addresses, but does not restrict the geographic region of the instance.

484
MCQmedium

A company uses Firestore in Native mode for their application. They need to query a collection where documents must match a specific field value and be sorted by a different field. The query filters on 'status' and orders by 'timestamp'. What should the engineer do to ensure the query performs optimally?

A.Create an index exemption to improve query performance.
B.Use a collection group query to bypass index requirements.
C.Rely on automatic single-field indexes; they will cover the query.
D.Create a composite index on the 'status' and 'timestamp' fields.
AnswerD

A composite index is required for queries with both an equality filter and an order by on different fields.

Why this answer

Firestore requires a composite index when a query includes both an equality filter on one field (status) and an order by clause on a different field (timestamp). Without this composite index, Firestore cannot efficiently satisfy both the filter and the sort order in a single index scan, leading to suboptimal performance or query failure. Creating a composite index on (status, timestamp) allows Firestore to use a single index to match the filter and return results in the requested order.

Exam trap

Google exams often test the misconception that automatic single-field indexes are sufficient for all queries, but the trap here is that queries combining an equality filter and an order by on different fields always require a composite index.

How to eliminate wrong answers

Option A is wrong because index exemptions do not exist in Firestore; the concept of index exemptions applies to other Google Cloud services like BigQuery, not Firestore. Option B is wrong because collection group queries are used to query across all collections with the same name, not to bypass index requirements; they still require appropriate indexes. Option C is wrong because automatic single-field indexes only cover queries that filter or order by a single field; a query with both a filter on one field and an order by on a different field requires a composite index.

485
MCQhard

An SRE team uses Cloud Monitoring to create an SLO for a service with a 99.9% availability target over 28 days. They set up a fast burn-rate alert on the error budget with a lookback window of 1 hour and a burn rate factor of 14. At what error budget consumption percentage will the alert fire?

A.When >10% of error budget is consumed in the last 1 hour
B.When >50% of error budget is consumed in the last 1 hour
C.When >2% of error budget is consumed in the last 1 hour
D.When >0.1% of error budget is consumed in the last 1 hour
AnswerC

With a 14x burn rate and 1-hour window, the alert triggers when consumption exceeds 2.08% (rounded to 2%).

Why this answer

Fast burn alert fires when the error budget consumption rate over the lookback window exceeds the burn rate threshold. With a 1-hour window and 14x burn rate, the alert fires when consumption exceeds 14 times the expected burn rate for that window. Expected burn for 1 hour is (1/672) of total budget (28 days = 672 hours).

So 14x = 14/672 = 2.08%. The alert fires when >2% consumed in 1 hour.

486
MCQhard

A company uses Cloud Spanner multi-region with the nam-eur-asia1 configuration. They experience a regional outage that affects two of the three regions. What is the expected behavior regarding read and write availability?

A.Reads are available but writes are unavailable until the leader region recovers.
B.The entire instance becomes unavailable due to loss of quorum.
C.The instance becomes read-only until at least two regions recover.
D.Read and write availability are unaffected because Spanner automatically fails over to remaining regions.
AnswerD

Spanner multi-region with nam-eur-asia1 (3 regions, multiple zones each) can tolerate loss of two regions. The remaining region(s) continue to serve reads and writes, with a brief failover if leader region is lost.

Why this answer

Spanner multi-region with 5+ regions (like nam-eur-asia1 which has 3 regions with multiple zones each) can tolerate the loss of up to two regions while maintaining read/write availability. The remaining region(s) will continue to serve reads and writes. However, if the leader region is lost, a new leader is elected from remaining regions, which may cause a brief write unavailability (RTO <1 min).

Spanner guarantees 99.999% availability for multi-region instances.

487
MCQeasy

You need to monitor the disk usage of your Cloud SQL instances and receive an alert when disk usage exceeds 80%. Which GCP service should you use to set up this alert?

A.Cloud Monitoring
B.Cloud Audit Logs
C.Cloud Logging
D.Cloud Billing reports
AnswerA

Cloud Monitoring provides metrics and alerting for Cloud SQL disk usage.

Why this answer

Cloud Monitoring (formerly Stackdriver) is the GCP service for monitoring metrics and setting up alerting policies. Cloud Logging is for logs, Cloud Audit Logs for audit trails, and Cloud Billing reports for cost tracking.

488
MCQmedium

A company is using DMS to migrate a MySQL database to Cloud SQL with continuous replication. During the CDC phase, the replication lag is increasing and not catching up. The source database is heavily used for OLTP workloads. Which action would most likely reduce the replication lag?

A.Increase the size of the Cloud SQL destination instance.
B.Increase the binary log retention period on the source.
C.Enable parallel replication on DMS.
D.Reduce the number of concurrent write operations on the source database.
AnswerD

Fewer writes mean fewer changes to replicate, allowing DMS to catch up.

Why this answer

Increasing the source database's binary log retention period does not reduce lag; it retains more logs. Reducing concurrent writes on source directly slows the rate of change, allowing DMS to catch up.

489
Multi-Selectmedium

A team wants to enforce that all Compute Engine disks must be encrypted with Customer-Managed Encryption Keys (CMEK) stored in Cloud Key Management Service (KMS). Which TWO steps should they take? (Choose two.)

Select 2 answers
A.Apply an organization policy 'constraints/compute.requireCmek' at the desired level.
B.Create a KMS key ring and key in the same region as the disks.
C.Use gcloud commands to encrypt all existing disks with the KMS key.
D.Enable the Cloud KMS API in each project where the policy is enforced.
E.Grant the cloudkms.cryptoKeyEncrypterDecrypter role to the Compute Engine service account.
AnswersA, B

This policy enforces that all disks use CMEK.

Why this answer

The organization policy constraint 'constraints/compute.requireCmek' enforces that all new Compute Engine disks in the specified hierarchy must be encrypted with a Customer-Managed Encryption Key (CMEK) from Cloud KMS. This policy prevents the creation of unencrypted disks or disks encrypted with Google-managed keys, ensuring compliance with security requirements.

Exam trap

The trap here is that candidates often confuse the IAM role required for the Compute Engine service account (which is the Compute Engine Service Agent, not the default compute service account) and mistakenly think enabling the Cloud KMS API is a step to enforce the policy rather than a prerequisite for using CMEK keys.

490
MCQeasy

A data analyst needs to load data from an on-premises Teradata system into BigQuery on a recurring daily schedule. Which Google Cloud service should they use?

A.Cloud Composer
B.Cloud Data Fusion
C.BigQuery Data Transfer Service
D.Database Migration Service (DMS)
AnswerC

Data Transfer Service supports Teradata scheduled transfers.

Why this answer

BigQuery Data Transfer Service is the correct service for scheduled, recurring data loads from on-premises Teradata into BigQuery. It supports Teradata via an agent-based transfer configuration. Cloud Composer is a workflow orchestration tool, not directly designed for this use case.

Cloud Data Fusion provides ETL capabilities but is not the best fit for simple daily Teradata-to-BigQuery transfers. Database Migration Service is intended for migrating databases to Cloud SQL, not for loading data into BigQuery.

491
MCQhard

A team uses Cloud Monitoring SLO monitoring with a request-based SLI. The SLO is defined as the proportion of requests returning HTTP 200 with latency under 500ms over a 30-day window. They notice that the SLO is being violated due to a slow increase in latency from a specific backend. Which alerting strategy will best detect this gradual degradation early?

A.Alert on any single request exceeding 500ms
B.Fast burn alert with burn rate 14 and 1-hour window
C.Slow burn alert with burn rate 5 and 6-hour window
D.Alert when average latency exceeds 500ms for 1 minute
AnswerC

Slow burn alerts are designed to detect gradual budget consumption.

Why this answer

Slow burn alerts (burn rate threshold ~5, lookback window ~6 hours) detect gradual budget consumption that would exhaust the budget over several days. Fast burn alerts (14x, 1h) catch rapid budget consumption. The scenario describes a slow increase, so a slow burn alert is appropriate.

492
MCQmedium

A BI team runs a daily query on a BigQuery table 'events' partitioned by event_date. The query filters on event_date = CURRENT_DATE() and counts rows by event_type. The query is slow. Upon review, the table has 500 partitions but clustering is not set. Which action reduces query cost and latency?

A.Recreate the table with only the last 30 days of data
B.Use a wildcard table for daily ingestion
C.Increase the partition expiration to 365 days
D.Add clustering on event_type
AnswerD

Clustering on event_type organizes data by that column within each partition, speeding up count and group by.

Why this answer

Adding clustering on `event_type` physically co-locates rows with the same event type within each partition. This allows BigQuery to use block-level pruning when reading data, drastically reducing the number of bytes scanned for the COUNT(*) GROUP BY query. Since the query already filters on a single partition (`event_date = CURRENT_DATE()`), the performance bottleneck is scanning all rows in that partition; clustering eliminates that overhead without changing the table's structure or retention.

Exam trap

Google Cloud often tests the misconception that reducing data volume (e.g., by deleting old partitions or using wildcards) is the primary way to fix query performance, when in fact the correct solution is to optimize data access patterns within the existing partitions using clustering.

How to eliminate wrong answers

Option A is wrong because recreating the table with only 30 days of data does not address the root cause—the query already reads only one partition, so reducing the number of partitions has no effect on the bytes scanned for that single day. Option B is wrong because using a wildcard table for daily ingestion is a pattern for querying multiple tables, not a performance optimization; it would not reduce latency or cost for a query that already targets a single partition. Option C is wrong because increasing partition expiration to 365 days retains more data, which increases storage costs and does nothing to reduce the scan size or improve query performance for a query that already filters on a single partition.

493
MCQeasy

A team is migrating an on-premises PostgreSQL database to Cloud SQL using DMS. They want the migration job to continuously replicate changes after the initial dump. Which type of migration job should they create?

A.One-time migration job
B.Scheduled export job
C.Bulk load job
D.Continuous migration job
AnswerD

Continuous jobs perform initial dump and then CDC.

Why this answer

DMS offers 'one-time' for single dump and 'continuous' for ongoing CDC. Continuous jobs replicate changes after dump.

494
MCQmedium

Your company runs a critical PostgreSQL database on Cloud SQL. You need to minimize downtime during a schema migration that could take up to 30 minutes. What should you do?

A.Use Database Migration Service to migrate to a new instance during the migration window.
B.Create a clone of the instance, perform the migration on the clone, then promote the clone.
C.Configure a high-availability instance and perform the migration during a planned failover.
D.Add a read replica, perform the migration on the replica, then promote it.
AnswerB

Cloning allows offline migration with minimal downtime.

Why this answer

Creating a clone of the Cloud SQL instance allows you to perform the schema migration on an isolated copy without affecting the production database. Once the migration is complete and verified, you can promote the clone to take over as the primary instance, minimizing downtime to just the brief promotion switchover (typically seconds). This approach avoids the long 30-minute migration window on the live database.

Exam trap

Google Cloud often tests the misconception that read replicas can be promoted to become the primary instance in Cloud SQL, but in reality, Cloud SQL read replicas are strictly read-only and cannot be promoted; only clones or HA failover replicas can assume the primary role.

How to eliminate wrong answers

Option A is wrong because Database Migration Service is designed for continuous migrations (e.g., from on-premises or other clouds) and would introduce unnecessary complexity and potential data loss for a schema-only change; it does not provide a zero-downtime schema migration path within Cloud SQL. Option C is wrong because configuring a high-availability instance does not eliminate the need to apply the schema migration to the primary; during a planned failover, the migration would still need to run on the new primary, causing the same 30-minute downtime. Option D is wrong because read replicas in Cloud SQL are read-only and cannot be promoted to a writable primary; promoting a read replica is not supported, and any schema changes on a read replica would be overwritten by replication from the primary.

495
Multi-Selecthard

A team uses Cloud Build to build and deploy a Go application to GKE. They need to inject the Git commit SHA as an environment variable in the deployment. Which THREE steps should they take?

Select 3 answers
A.Grant the Cloud Build service account permission to update the Deployment
B.Use Cloud Deploy instead of kubectl
C.Run kubectl set env deployment/myapp COMMIT_SHA=$SHORT_SHA after the image is deployed
D.Create a new Docker image tag with the commit SHA
E.Use the built-in substitution $SHORT_SHA in a cloudbuild.yaml step
AnswersA, C, E

Needed to run kubectl set env or patch.

Why this answer

The Cloud Build service account needs the `container.deployments.update` permission (or a role like `roles/container.developer`) to modify the Deployment object in GKE. Without this IAM permission, the `kubectl set env` command in the build step will fail with a forbidden error, even if the image was successfully deployed.

Exam trap

Google Cloud often tests the misconception that you must rebuild and retag the Docker image to pass the commit SHA, when in fact you can inject it at deployment time using `kubectl set env` without modifying the image.

496
MCQmedium

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

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

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

Why this answer

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

497
MCQhard

A financial services company uses Cloud Spanner for transaction processing. They need to ensure zero downtime during a schema change that adds a new column with a default value to a large table. Which approach should the Database Engineer take?

A.Create a new table with the new column, then use a fan-out pattern to write to both tables until the old table is deprecated.
B.Use an ALTER TABLE statement during a maintenance window.
C.Drop the table and recreate it with the new schema.
D.Use ALTER TABLE to add the column; Spanner handles schema changes online.
AnswerD

Spanner schema changes are online and do not cause downtime.

Why this answer

Cloud Spanner supports online schema changes, including adding columns with default values, without requiring a maintenance window or causing downtime. Spanner applies schema updates asynchronously across all nodes while the database remains fully available for reads and writes, making it the ideal approach for zero-downtime requirements.

Exam trap

The trap here is that candidates assume schema changes on large databases always require a maintenance window or a workaround like dual-write patterns, but Spanner's distributed architecture is specifically designed to handle schema changes online without downtime.

How to eliminate wrong answers

Option A is wrong because it introduces unnecessary complexity and operational overhead; Spanner's native online schema change capability eliminates the need for a fan-out pattern, which would also require dual-write management and eventual deprecation logic. Option B is wrong because it assumes a maintenance window is required, contradicting Spanner's design for online schema changes that do not need planned downtime. Option C is wrong because dropping and recreating a table causes complete data loss and extended downtime, which is entirely unnecessary when Spanner can add columns online without disruption.

498
MCQmedium

A company uses Cloud Bigtable to store session data. They need to monitor replication lag between clusters in different zones. Which metric should they use?

A.Instance-level 'replication_lag' metric.
B.Cluster-level 'cpu_load' metric.
C.Use Key Visualizer to identify replication delays.
D.Table-level 'rows_returned' metric.
AnswerA

Correct. Replication lag is measured in seconds and available in Cloud Monitoring.

Why this answer

Cloud Bigtable exposes an instance-level 'replication_lag' metric that measures the time delay (in seconds) between clusters in a replicated instance. This metric directly reflects how far behind a replica cluster is relative to the primary cluster, making it the appropriate choice for monitoring replication lag between zones.

Exam trap

Google Cloud often tests the distinction between metrics that measure performance (like CPU load) versus metrics that measure data freshness (like replication lag), and candidates may confuse Key Visualizer's diagnostic capabilities with real-time monitoring metrics.

How to eliminate wrong answers

Option B is wrong because 'cpu_load' is a cluster-level metric that measures CPU utilization, not replication lag; it does not indicate how current a replica is. Option C is wrong because Key Visualizer is a tool for analyzing access patterns and hotspotting, not for monitoring real-time replication lag; it provides historical heatmaps, not a continuous lag metric. Option D is wrong because 'rows_returned' is a table-level metric that counts rows returned by read requests, which has no relation to replication delay between clusters.

499
Multi-Selectmedium

Your Cloud SQL for PostgreSQL database is experiencing slow query performance. You want to identify and optimize the slowest queries. Which TWO actions should you take? (Choose two)

Select 2 answers
A.Set up connection pooling using Cloud SQL Auth Proxy and PgBouncer.
B.Create read replicas to offload read traffic.
C.Enable the slow query log by setting the log_min_duration_statement flag.
D.Increase the instance memory to the next tier.
E.Use EXPLAIN ANALYZE on candidate queries to see the execution plan and bottlenecks.
AnswersC, E

This flag logs queries that exceed a duration threshold, helping identify slow queries.

Why this answer

To identify slow queries, enable the slow query log (via database flags) and use EXPLAIN ANALYZE to analyze query plans. Right-sizing the instance can help after identifying queries, but identifying them first requires logging and analysis. Connection pooling does not help identify slow queries.

500
Multi-Selectmedium

A company uses Cloud Spanner for a global application. They need to capture real-time changes to certain tables for downstream processing. Which two services or features can be used together to achieve this? (Choose TWO.)

Select 2 answers
A.Spanner change streams
B.Cloud Pub/Sub Lite
C.Cloud SQL for PostgreSQL
D.Cloud Functions
E.Cloud Dataflow
AnswersA, E

Change streams provide a log of row-level changes.

Why this answer

Spanner change streams capture transactional changes in near real-time. Dataflow can read from change streams and stream the changes to downstream systems like Pub/Sub, BigQuery, or Cloud Storage.

501
MCQhard

A BI team in a large enterprise uses Looker connected to BigQuery. The data model has a primary table 'sales_fact' with billions of rows and multiple dimensions. The team notices that Looker queries often time out. Which approach would most likely resolve this without changing the data model?

A.Request Google Support to increase BigQuery timeout
B.Create a materialized view in BigQuery for the most common aggregations
C.Increase BigQuery slot capacity
D.Switch Looker to use SQL Runner only
AnswerB

Materialized views precompute aggregates and are automatically refreshed, reducing query time without model changes.

Why this answer

Materialized views in BigQuery pre-compute and store the results of common aggregations, allowing subsequent queries to read pre-aggregated data instead of scanning the full sales_fact table. This reduces query execution time significantly without altering the underlying data model, directly addressing the timeout issue.

502
MCQhard

A team uses Cloud Monitoring to create an SLO for a request-based service. They want to alert when the error budget burn rate exceeds 14x the budget for a short window. Which alert type and window should they configure?

A.Slow burn alert with a 6-hour window.
B.Fast burn alert with a 6-hour window.
C.Fast burn alert with a 1-hour window.
D.Slow burn alert with a 1-hour window.
AnswerC

This matches the standard recommendation for fast burn alerts with 14x burn rate over 1 hour.

Why this answer

A fast burn alert fires when the burn rate is very high over a short window (1 hour). 14x burn rate means the entire budget would be consumed in ~1/14 of the SLO window. The correct configuration is a fast burn alert with a 1-hour window.

503
Multi-Selecthard

Which THREE actions can help reduce read latency in Cloud Spanner?

Select 3 answers
A.Use read-only transactions with strong consistency
B.Increase the staleness allowed for read queries
C.Structure tables with interleaved parent-child relationships
D.Use secondary indexes to avoid full table scans
E.Batch multiple write operations into a single mutation
AnswersA, C, D

Read-only transactions can execute faster without locks.

Why this answer

Read-only transactions with strong consistency in Cloud Spanner use lock-free reads that return the most recent data without blocking writes. This reduces read latency because the system can serve the data directly from the current timestamp without waiting for write locks or replication delays, making it ideal for low-latency, strongly consistent reads.

Exam trap

Google Cloud often tests the distinction between read latency and write latency, so candidates may incorrectly choose batching writes (Option E) or increasing staleness (Option B) as read latency reducers, when in fact those affect write performance or trade off consistency for speed.

504
MCQeasy

Which Google Cloud service provides continuous, low-overhead profiling of CPU and memory usage to identify performance bottlenecks in production?

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

Cloud Profiler provides continuous profiling with low overhead (0.5%).

505
MCQhard

An SRE team wants to perform fault injection testing on a GKE cluster by injecting network latency into a specific set of pods. Which tool should they use?

A.Cloud Functions with network disruption script.
B.Traffic Director fault injection.
C.Google Cloud Armor.
D.Chaos Mesh on GKE.
AnswerD

Chaos Mesh is designed for injecting various faults (latency, failures) into Kubernetes workloads.

Why this answer

Chaos Mesh is an open-source chaos engineering platform specifically designed for Kubernetes. It can inject faults like network latency into targeted pods.

506
MCQhard

Your GKE cluster runs a stateful application that requires persistent storage. You want to use Vertical Pod Autoscaler (VPA) to optimize resource requests, but you notice that pods are being terminated and recreated when VPA updates resource recommendations. You want to avoid pod restarts. Which VPA updateMode should you use?

A.updateMode: Recreate
B.updateMode: Off
C.updateMode: Initial
D.updateMode: Auto
AnswerC

Initial applies recommendations only to newly created pods, avoiding restarts of existing pods.

Why this answer

VPA updateMode: Auto will evict and recreate pods to apply new resource limits. To avoid restarts, you can use Initial (applies only to new pods) or Off (no changes). The question asks to avoid pod restarts, so Initial is appropriate if you can accept that existing pods keep their old limits.

Recreate is the same as Auto. Off disables VPA.

507
MCQhard

A service uses Cloud SQL for MySQL. To test resilience, you want to inject latency into database queries. Which chaos engineering approach is most suitable on Google Cloud?

A.Use gcloud sql instances patch to add artificial delay
B.Use Traffic Director fault injection filter on the Envoy proxy sidecar
C.Use Cloud SQL's built-in maintenance to simulate latency
D.Deploy Cloud Functions to throttle the database connection
AnswerB

Traffic Director with Envoy can inject latency into outbound requests, including to Cloud SQL via a sidecar.

Why this answer

Traffic Director's fault injection filter on the Envoy proxy sidecar can inject latency into database queries by intercepting traffic at the service mesh layer. This approach allows controlled introduction of delays without modifying applications. Option A is incorrect because gcloud sql instances patch cannot add artificial delay.

Option C is incorrect as Cloud SQL's built-in maintenance does not simulate latency in queries. Option D is incorrect because Cloud Functions throttling does not inject latency into database queries.

508
Drag & Dropmedium

Order the steps to set up a Cloud Spanner instance with a global database.

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

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

Why this order

The correct sequence for setting up Cloud Spanner starts with creating the instance to provide compute and storage resources, then creating the database within that instance, followed by defining the schema (tables and indexes), inserting data, and finally configuring IAM to manage access. This logical progression ensures that each step builds on the previous one, avoiding dependency errors.

509
MCQmedium

You need to export data from Cloud Spanner for archival purposes. Which method is most cost-effective?

A.Use a Cloud Function to copy data
B.Use Dataflow to read and write to Cloud Storage
C.Use gcloud spanner databases export
D.Use gcloud spanner databases execute-sql
AnswerC

The export command directly exports to Cloud Storage with no extra compute cost.

Why this answer

`gcloud spanner databases export` uses Cloud Spanner's built-in managed export feature, which directly exports data to Cloud Storage in Avro format without incurring compute costs from Dataflow or Cloud Functions. This is the most cost-effective method for archival purposes as it leverages Spanner's internal export infrastructure, which is optimized for bulk data movement and has no additional per-operation compute charges beyond the storage and network egress costs.

Exam trap

A common pitfall in Google Cloud exams is assuming that exporting data from Cloud Spanner requires a separate compute service like Dataflow or Cloud Functions. However, Cloud Spanner provides a native managed export feature (`gcloud spanner databases export`) that directly exports to Cloud Storage in Avro format, without additional compute costs. Candidates may overlook this built-in capability and choose costlier alternatives.

How to eliminate wrong answers

Option A is wrong because using a Cloud Function to copy data would require custom code to read from Spanner and write to Cloud Storage, incurring compute costs per invocation and lacking the optimized bulk export capabilities of the managed export, making it less cost-effective and more complex. Option B is wrong because Dataflow, while capable of reading from Spanner and writing to Cloud Storage, introduces additional compute costs for Dataflow workers and requires managing a pipeline, which is unnecessary when the native export feature provides a simpler and cheaper alternative. Option D is wrong because `gcloud spanner databases execute-sql` is designed for executing SQL queries and returning results, not for exporting large datasets; it would require multiple queries and manual handling of pagination, leading to high latency, potential timeouts, and increased read costs, making it impractical and expensive for archival.

510
MCQmedium

You are tuning a Cloud SQL for PostgreSQL instance that runs reporting queries. The slowest query performs a full table scan on a 100 GB table. Which action is most likely to improve performance?

A.Create an index on the columns used in the WHERE clause
B.Increase shared_buffers to 50% of instance memory
C.Set statement_timeout to 30 seconds
D.Move the query to a read replica
AnswerA

An index allows the database to locate rows quickly.

Why this answer

A full table scan on a 100 GB table indicates that PostgreSQL has no efficient access path to retrieve the required rows. Creating an index on the columns used in the WHERE clause allows the query planner to use an index scan instead of a sequential scan, drastically reducing the number of disk pages read and improving query performance. This is the most direct and effective optimization for a query that filters rows without an index.

Exam trap

Google Cloud often tests the misconception that simply adding more memory or offloading work to a replica will fix performance issues caused by missing indexes, but the root cause—lack of an access path—must be addressed directly.

How to eliminate wrong answers

Option B is wrong because increasing shared_buffers to 50% of instance memory can cause excessive memory consumption, leading to increased checkpoint I/O and potential out-of-memory errors; PostgreSQL recommends shared_buffers be set to 25% of total memory, not 50%. Option C is wrong because setting statement_timeout to 30 seconds does not improve performance—it only aborts the query if it exceeds that duration, which would cause the query to fail rather than run faster. Option D is wrong because moving the query to a read replica does not eliminate the full table scan; the replica still performs the same sequential scan on the same large table, so performance remains poor.

511
Multi-Selecteasy

A development team is using Firestore in Native mode. They want to ensure that queries on array fields return correct results. Which two actions should they take? (Choose TWO.)

Select 2 answers
A.Create a composite index for every query involving array fields.
B.Set index exemptions for arrays and maps to disable automatic indexing.
C.Use the 'array-contains' operator only on indexed arrays.
D.Manually create indexes for each array field in the Firestore console.
E.Understand that array fields are automatically indexed as single-field indexes.
AnswersC, E

Correct. The array-contains operator can only be used on fields that are indexed. Since Firestore auto-indexes array fields, this is typically satisfied unless exemptions are set.

Why this answer

Firestore automatically creates single-field indexes for all fields, including array fields. This means the array-contains operator works without manual indexing, provided the field has not been excluded via index exemptions. However, to ensure queries return correct results, developers must understand that array fields are indexed by default (E) and that array-contains only works on indexed arrays (C).

Option B is incorrect because disabling indexing via exemptions would prevent array-contains queries from working.

Exam trap

A common trap is thinking that array fields require special manual indexing or that index exemptions are needed for queries to work. In reality, automatic indexing covers array fields, and exemptions only serve to exclude fields to reduce costs or meet specific requirements.

512
MCQhard

An organization is performing a DMS continuous migration from PostgreSQL to Cloud SQL. The migration job is in the CDC phase. During a planned maintenance window, the source database is restarted. After restart, the DMS job continues to replicate but reports a lag. What is the impact of the restart on the migration?

A.The migration job will switch to one-time migration mode.
B.The migration job will resume automatically from where it stopped.
C.The migration job will fail and require a new full dump.
D.The migration job will continue but with increased latency until all WAL is replayed.
AnswerB

The logical replication slot maintains the LSN position; after restart, DMS continues from that point.

Why this answer

Once the replication slot is established, a restart does not require a full re-sync. The slot retains the position, and DMS will resume from the last committed transaction. Autovacuum may affect performance but does not stop replication.

513
MCQmedium

You need to set up an alert that fires when any of your Compute Engine instances has been down (no metric data) for more than 10 minutes. Which condition type should you use?

A.Metric absent
B.Metric threshold
C.Log match
D.Forecast
AnswerA

Correct. Metric absent fires when data stops reporting for a given duration.

Why this answer

The 'metric absent' condition fires when a metric stops reporting data for a specified duration. This is ideal for detecting instance downtime. 'Metric threshold' requires a value above/below a threshold; 'forecast' predicts future values; 'log match' is for log-based alerts (not applicable for instance up/down).

514
Multi-Selectmedium

A company uses Memorystore for Redis and wants to achieve high availability with automatic failover. They also need to periodically back up the data to Cloud Storage for disaster recovery. Which TWO features should they use? (Choose two.)

Select 2 answers
A.Standard Tier (replication)
B.Export functionality to Cloud Storage
C.Redis Cluster
D.AOF persistence
E.Basic Tier
AnswersA, B

Standard Tier provides a replica in a different zone for automatic failover.

Why this answer

Standard Tier (replication) provides a primary-replica architecture with automatic failover, ensuring high availability. The Export functionality allows you to manually or scheduled export Redis data to Cloud Storage, enabling point-in-time recovery for disaster recovery purposes.

Exam trap

The Google Cloud exam often tests the distinction between high-availability features (replication/failover) and durability/backup features (export to Cloud Storage), tricking candidates into selecting AOF persistence or Redis Cluster as solutions for disaster recovery.

515
Multi-Selectmedium

A team wants to implement chaos engineering on GKE to test resilience. Which THREE fault types can be injected using Chaos Mesh? (Choose 3 answers)

Select 3 answers
A.Pod failure (kill pods).
B.Code injection into running containers.
C.Whole cluster deletion.
D.CPU stress.
E.Network latency.
AnswersA, D, E

Common fault type in Chaos Mesh.

Why this answer

Chaos Mesh supports many fault types including pod failure (kill), network latency, and CPU stress. A whole cluster deletion is not a typical Chaos Mesh experiment (too destructive), and code injection is not a built-in fault type.

516
MCQmedium

A Cloud Firestore database stores documents for a mobile app. The app frequently queries for documents where a specific Boolean field is true. The field is not part of the collection group index. What should the developer do to improve query performance?

A.Add a synthetic field that combines the Boolean with a timestamp for range queries.
B.Create a composite index that includes the Boolean field and the query ordering field.
C.Denormalize the Boolean field into separate subcollections.
D.Rely on the automatic single-field index already created.
AnswerB

A composite index tailored to the query pattern improves performance and avoids full collection scans.

Why this answer

Cloud Firestore requires a composite index to efficiently query on a Boolean field combined with an ordering field. Without this index, the query would perform a full collection scan, leading to poor performance. Creating a composite index that includes the Boolean field and the query ordering field allows Firestore to use the index to directly locate matching documents, avoiding expensive sequential scans.

Exam trap

Candidates often assume that automatic single-field indexes are sufficient for all queries, but in Firestore, queries with both a filter and an order-by clause require a composite index, even if the filter is on a simple Boolean field.

How to eliminate wrong answers

Option A is wrong because adding a synthetic field that combines the Boolean with a timestamp is unnecessary and does not address the missing composite index; it would only help if the query involved range filtering on the timestamp, which is not stated. Option C is wrong because denormalizing the Boolean field into separate subcollections would increase complexity and data duplication without improving query performance, as Firestore still needs to query across subcollections unless collection group indexes are used. Option D is wrong because automatic single-field indexes are created by default for each field, but they do not support queries that filter on one field and order by another; a composite index is required for such queries.

517
MCQhard

Your Cloud Spanner database has a table with a secondary index that is used for range queries. You notice that the index queries are slow because they require back-and-forth between the index and the base table. How can you optimize the index to reduce this overhead?

A.Use the STORING clause to include frequently queried columns in the index.
B.Convert the table to use hash-prefixed keys.
C.Create a new interleaved table and move the index data there.
D.Use the spanner_interleave_in_parent option when creating the index.
AnswerA

Storing columns in the index makes it a covering index, eliminating the need to read the base table.

Why this answer

In Cloud Spanner, you can store additional columns from the base table in the secondary index using the STORING clause. This allows the index to satisfy queries without accessing the base table (covering index). INTERLEAVE IN PARENT for the index can also improve locality if the index is interleaved with a parent table.

The question asks to reduce overhead of back-and-forth, which is solved by storing columns in the index.

518
MCQmedium

A company wants to visualize request latency distribution across all services using a heatmap. Which Cloud Monitoring chart type should be used?

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

Heatmaps show distributions over time with color intensity.

519
MCQmedium

An engineer needs to create a cross-region read replica for a Cloud SQL for MySQL instance to improve read scalability and provide disaster recovery. What must be configured on the primary instance to support cross-region replication?

A.Enable binary logging on the primary instance.
B.Enable automated backups and point-in-time recovery.
C.Configure a Cloud VPN between the regions.
D.Set the primary instance to use MySQL 8.0.
AnswerA

Correct. Binary logging is required for any replication, especially cross-region.

Why this answer

Cross-region replication for Cloud SQL for MySQL relies on MySQL's native binary log (binlog) based replication. Enabling binary logging on the primary instance records all data changes in binary log files, which the read replica in another region uses as the source for applying changes. Without binary logging enabled, the primary instance cannot provide the change stream necessary for cross-region replication to function.

Exam trap

Google often tests the misconception that network connectivity (like VPN) or backup features are required for replication, when in fact the core requirement is enabling the binary log on the primary instance to provide the change stream.

How to eliminate wrong answers

Option B is wrong because automated backups and point-in-time recovery are not prerequisites for replication; they are separate features for data recovery and do not provide the ongoing change stream needed for replication. Option C is wrong because Cloud SQL cross-region replication uses Google's internal network and does not require a Cloud VPN; the replication traffic traverses Google's backbone, not a customer-managed VPN tunnel. Option D is wrong because MySQL 8.0 is not a requirement for cross-region replication; Cloud SQL supports replication for MySQL 5.7 and 8.0, and the version must be compatible between primary and replica, but the key enabler is binary logging, not the specific major version.

520
MCQhard

A site reliability engineer wants to implement chaos engineering on a Google Kubernetes Engine (GKE) cluster by injecting network latency into pods of a specific deployment. Which tool or service should they use?

A.GKE Sandbox
B.Cloud CDN
C.Traffic Director with HTTP fault filter
D.Chaos Mesh
AnswerD

Chaos Mesh provides fault injection capabilities for Kubernetes, including network latency.

Why this answer

Chaos Mesh is a Kubernetes-native chaos engineering platform that supports injecting faults like network latency, pod failures, and more on GKE.

521
MCQeasy

Which notification channel can be used with Cloud Monitoring to trigger a custom workflow in Cloud Functions when an alert fires?

A.Slack via Pub/Sub
B.PagerDuty
C.Email
D.Cloud Pub/Sub
AnswerD

Pub/Sub can trigger Cloud Functions, Cloud Run, etc. for custom workflows.

Why this answer

Cloud Pub/Sub is a notification channel that can trigger downstream services like Cloud Functions.

522
MCQmedium

A Cloud SQL for MySQL instance is running out of storage. The team wants to increase storage automatically without manual intervention. However, they also want to control costs and avoid a sudden increase in storage beyond 1 TB. What should they do?

A.Set up a Cloud Function to monitor disk usage and resize the disk when needed.
B.Enable auto-storage increase and set the maximum storage size to 1 TB.
C.Manually increase disk size by 10% each time usage reaches 80%.
D.Enable auto-storage increase; it automatically stops at 1 TB.
AnswerB

Auto-increase with a cap meets both requirements.

Why this answer

Cloud SQL for MySQL provides an 'auto-storage increase' feature that automatically adds storage when usage is high. To control costs and prevent storage from exceeding 1 TB, you can enable this feature and set the maximum storage size to 1 TB. Option B is correct because it combines automation with a cost cap.

Option A (using a Cloud Function) is more complex and not necessary since Cloud SQL has a built-in feature; it also doesn't guarantee a cap. Option C (manual resize) is not automated. Option D (enable auto-storage increase without setting a maximum) would allow storage to grow beyond 1 TB, failing the cost control requirement.

523
Multi-Selectmedium

A manufacturing company is deploying a time-series database for sensor data on Cloud Bigtable. They expect 100 TB of data per year and need low-latency reads on row keys within the last hour. Which TWO design choices should they make?

Select 2 answers
A.Set the maximum QPS to 1000 to avoid overloading the cluster.
B.Partition the data into separate tables for each month.
C.Use a reverse timestamp in the row key so that recent data is at the beginning of the table.
D.Use a salting prefix on the row key to distribute writes across nodes.
E.Design row keys to be as long as possible to avoid collisions.
AnswersC, D

Reversing the timestamp makes the most recent data appear first, speeding up reads for the last hour.

Why this answer

Using a reverse timestamp in the row key (e.g., `[max_timestamp - timestamp]`) ensures that the most recent sensor data appears at the beginning of the sorted Bigtable row range. This allows low-latency scans for the last hour's data without scanning the entire table, as Bigtable stores rows in lexicographic order by row key.

Exam trap

The Google PCDE exam often tests the misconception that partitioning data into separate tables (option B) is a good scaling strategy, when in fact Bigtable's single-table design with proper row key structure is the correct approach for time-series data.

524
MCQhard

A Cloud Bigtable instance is experiencing hotspotting on a single node during heavy write traffic. The row keys are based on a timestamp prefix. Which change should they make to the row key design to distribute writes evenly?

A.Use a reverse timestamp (e.g., MAX_TIMESTAMP - timestamp)
B.Increase the number of nodes in the cluster
C.Add a random prefix (salting) to the row key
D.Enable replication across zones
AnswerC

Salting distributes writes across nodes by randomizing the start of the row key.

Why this answer

Adding a random prefix (salting) to the row key distributes writes across multiple tablet servers by ensuring that consecutive timestamps do not all hash to the same node. This prevents hotspotting because Cloud Bigtable partitions rows lexicographically by row key; a monotonically increasing timestamp prefix causes all new writes to land on a single tablet server. Salting spreads the write load uniformly across the cluster.

Exam trap

Google Cloud often tests the misconception that scaling infrastructure (adding nodes or replication) can fix a design-level hotspotting issue, when the correct solution is to modify the row key schema to distribute the load.

How to eliminate wrong answers

Option A is wrong because reversing the timestamp (e.g., MAX_TIMESTAMP - timestamp) still produces a monotonically decreasing sequence, which will still hotspot on a single node as all new writes will be adjacent in the key space. Option B is wrong because increasing the number of nodes does not fix the root cause—the row key design still funnels all writes to one tablet server; additional nodes will remain idle for writes. Option D is wrong because replication across zones is for disaster recovery and read scalability, not for distributing write load within a single cluster; it does not change the row key distribution.

525
MCQmedium

You are designing a database architecture for a global e-commerce application. The application requires low-latency reads in multiple regions and must handle up to 100,000 writes per second globally. Which Google Cloud database solution should you use?

A.Firestore in multi-region mode.
B.Bigtable with multiple clusters.
C.Cloud SQL with cross-region replication.
D.Cloud Spanner with multi-region configuration.
AnswerD

Spanner is designed for global scale and strong consistency.

Why this answer

Cloud Spanner with a multi-region configuration is the correct choice because it provides globally distributed, strongly consistent relational database service with horizontal scalability, supporting over 100,000 writes per second across multiple regions while maintaining ACID transactions and low-latency reads via regional replicas. This meets the requirements of a global e-commerce application needing high write throughput and low read latency in multiple regions.

Exam trap

The trap here is that candidates often confuse high write throughput with NoSQL solutions like Bigtable or Firestore, overlooking that Cloud Spanner uniquely combines horizontal scalability with strong consistency and SQL support required for transactional e-commerce workloads.

How to eliminate wrong answers

Option A is wrong because Firestore in multi-region mode is a NoSQL document database optimized for mobile and web apps with eventual consistency for multi-region reads, not designed for 100,000 writes per second globally and lacks strong transactional consistency across regions. Option B is wrong because Bigtable with multiple clusters is a wide-column NoSQL database designed for high-throughput analytical workloads, not transactional e-commerce, and does not support SQL queries or strong consistency across clusters. Option C is wrong because Cloud SQL with cross-region replication is a managed relational database with limited scalability (max ~64,000 writes per second for MySQL) and cross-region replication introduces replication lag, failing to meet low-latency reads and high write throughput globally.

Page 6

Page 7 of 20

Page 8