Courseiva

Google Professional Cloud Database Engineer (PCDE) — Questions 11261200

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

Page 15

Page 16 of 20

Page 17
1126
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1127
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1128
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1129
MCQmedium

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

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

Lower max_staleness forces more frequent refreshes.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1130
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1131
MCQeasy

A financial services company runs a high-frequency trading application that requires strong consistency, horizontal scalability, and low-latency transactions across multiple regions. Which Google Cloud database should they choose?

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

Spanner offers global distribution, strong consistency, and horizontal scalability for high-frequency trading.

Why this answer

Cloud Spanner is a globally distributed, strongly consistent, horizontally scalable relational database service designed for mission-critical applications like trading. Cloud SQL is not multi-region, Bigtable does not support SQL/ACID, and Firestore is not relational.

1132
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1133
MCQeasy

A startup is building a mobile app and needs a fully managed database that scales automatically for unpredictable workloads. They expect moderate read/write traffic with occasional spikes. They want minimal operational overhead and do not need global distribution. Which Google Cloud database is MOST appropriate?

A.Cloud SQL for PostgreSQL with HA
B.Cloud Spanner regional
C.Cloud Firestore in native mode
D.Cloud Bigtable
AnswerC

Firestore is serverless, auto-scaling, fully managed, and suitable for mobile backends with moderate traffic.

Why this answer

Cloud Firestore is fully managed, serverless, auto-scales, and ideal for mobile apps with moderate traffic. Cloud SQL requires manual scaling. Bigtable is overkill and complex for this workload.

Spanner is designed for global scale and is more complex than needed.

1134
Multi-Selectmedium

A company is migrating an on-premises PostgreSQL database to Cloud SQL using Database Migration Service with continuous replication. The source database has binary logging enabled and uses the pglogical plugin. The migration job is failing after the full dump phase. Which THREE common issues should the engineer check? (Choose 3 correct answers.)

Select 3 answers
A.The source database is not configured for logical replication (e.g., wal_level is not logical).
B.Insufficient disk space on the source for WAL files.
C.Cloud SQL Auth Proxy is not installed on the source.
D.The replication slot is exhausted or not created.
E.The source database is MySQL.
AnswersA, B, D

Logical replication requires wal_level=logical.

Why this answer

For PostgreSQL CDC migration, DMS uses pglogical. Common issues include: logical replication slot not created or exhausted, insufficient disk space for WAL files, and network connectivity issues (e.g., firewall blocking replication port 5432). Cloud SQL Auth Proxy is not needed for DMS to Cloud SQL connectivity if using private IP/peering.

Source database must be PostgreSQL, not MySQL.

1135
MCQhard

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

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

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

Why this answer

Promoting the cross-region read replica (Option A) is the correct action because it allows the application to resume operations quickly (under 15 minutes) with minimal data loss. Asynchronous replication means some transactions may be lost, but this approach is faster than restoring from a backup, which would exceed the 15-minute RTO for a high-write application. Options B, C, and D are incorrect: synchronous replication across regions is not supported in Cloud SQL for PostgreSQL (B); restoring from backup takes longer than 15 minutes and results in more data loss (C); increasing backup frequency does not enable fast failover (D).

1136
Multi-Selectmedium

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

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

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

Why this answer

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

Exam trap

A common pitfall in Cloud SQL for MySQL is relying on LIKE with wildcards for text search, which cannot use FULLTEXT indexes and leads to full table scans. Cloud SQL supports FULLTEXT indexes and MATCH...AGAINST queries for efficient full-text search.

1137
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1138
MCQhard

A company runs an e-commerce platform on Cloud Spanner multi-region (nam6). They experience a regional failure affecting the leader region. After failover, they observe increased write latency. What is the most likely cause?

A.The new leader region is geographically farther from the application instances.
B.The new leader region has fewer replicas.
C.The instance is now running in read-only mode.
D.The failover caused data loss, requiring recovery.
AnswerA

Correct: write latency increases when the leader region is farther from the clients, as all writes must be committed in the leader region.

Why this answer

In a multi-region Spanner configuration, the leader region handles write coordination. After failover, a new leader is elected in a different region, which may be farther from the majority of clients, increasing write latency if clients are not geographically distributed.

1139
Multi-Selectmedium

A gaming company uses Cloud Spanner for a global leaderboard. They need to add a column to an existing table and create a secondary index on that column. The database must remain fully available during these changes. Which THREE statements are true?

Select 3 answers
A.The new column cannot be added if the table has existing data.
B.The new column must have a default value if it is defined as NOT NULL.
C.CREATE INDEX will block writes on the table until the index is built.
D.ALTER TABLE can be executed while the database is serving traffic.
E.The DDL statements can be submitted together in a single ALTER DATABASE statement.
AnswersB, D, E

Adding a NOT NULL column without default requires a table lock; with a default it is online.

Why this answer

In Cloud Spanner, when adding a NOT NULL column to an existing table, the column must have a DEFAULT value. This ensures that existing rows, which will be populated with the default value, satisfy the NOT NULL constraint without requiring a full table scan or blocking writes.

Exam trap

A common misconception is that schema changes in distributed databases require downtime or blocking, but Cloud Spanner's online DDL operations are designed to maintain full availability during both ALTER TABLE and CREATE INDEX.

1140
MCQeasy

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

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

65% is the recommended threshold to maintain performance headroom.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1141
MCQmedium

A company uses Firestore in Native mode and has a collection with many documents containing array fields. They want to index the array values to support queries like 'array-contains'. What is the correct approach?

A.Create an index exemption for the array field to enable indexing
B.Switch to Datastore mode and configure indexes manually
C.Create a composite index that includes the array field
D.No additional index configuration is required; arrays are automatically indexed
AnswerD

Correct. In Firestore Native mode, array fields are automatically indexed, so no additional configuration is needed for array-contains queries.

Why this answer

In Firestore Native mode, all fields are automatically indexed by default, including array fields. For array fields, the index includes each element, which allows queries using the `array-contains` operator to work without any additional configuration. Index exemptions are used to exclude specific fields from automatic indexing, not to enable indexing.

Therefore, no action is required.

Exam trap

Candidates often confuse Firestore Native mode with Datastore mode. In Native mode, indexes are automatic; in Datastore mode, indexes must be manually configured. Also, 'index exemption' is for excluding fields, not adding them.

1142
MCQmedium

A company is migrating their on-premises Oracle OLTP workload to Cloud SQL for PostgreSQL. The database currently supports 500 concurrent connections and has a working set of 8 GB. What is the minimum memory required for the Cloud SQL instance based on the max_connections formula (max_connections = RAM_MB/16)?

A.16 GB
B.4 GB
C.8 GB
D.32 GB
AnswerC

8 GB supports 500 connections by the formula.

Why this answer

Using the formula, RAM = max_connections * 16 = 500 * 16 = 8000 MB = 8 GB. However, this is only for connection overhead; additional memory is needed for buffer pool and working set. The question asks for minimum memory based on the formula alone, so 8 GB is the answer.

1143
MCQeasy

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

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

Partition pruning scans only relevant partitions, minimizing data processing.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1144
Multi-Selecthard

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

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

Leader placement reduces write latency and indirectly benefits read latency.

Why this answer

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

Exam trap

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

1145
MCQhard

An organization is migrating a Redshift data warehouse to BigQuery using BigQuery Data Transfer Service. They have scheduled a recurring transfer. However, they notice that some columns are not being mapped correctly. What is the most likely cause?

A.Insufficient BigQuery permissions
B.Source column order differs from destination
C.Transfer schedule is too frequent
D.Incorrect column mapping configuration
AnswerD

If the schema mapping is not correctly defined, columns may be mismapped.

Why this answer

BigQuery Data Transfer Service may require schema mapping, and incorrect column mapping can cause data to go to wrong columns or be dropped. Permission issues would cause failures, not incorrect mapping. Scheduled transfers don't affect mapping.

Column ordering is not relevant.

1146
MCQeasy

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

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

Only scans partitions matching the date range, minimizing cost.

Why this answer

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

Exam trap

A common misconception is that clustering alone is sufficient for cost savings on date-range queries in BigQuery. However, without partitioning, BigQuery cannot skip entire storage blocks, so clustering only provides minor sorting benefits and does not reduce the amount of data scanned. Partitioning by date is essential for pruning and cost-effectiveness.

How to eliminate wrong answers

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

1147
MCQmedium

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

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

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

Why this answer

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

1148
MCQeasy

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

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

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

Why this answer

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

1149
MCQmedium

A DevOps engineer wants to test disaster recovery for a Cloud SQL for MySQL instance by simulating a zone failure without impacting production traffic. They need to ensure minimal data loss. Which approach should they take?

A.Take an on-demand backup and restore it to a new Cloud SQL instance
B.Use the gcloud command to perform a point-in-time recovery on the same instance
C.Enable the HA configuration and trigger a failover by stopping the primary instance
D.Promote a cross-region read replica in a test project to validate the failover process
AnswerD

Using a read replica in a test project is non-destructive and simulates the failover process without affecting production.

Why this answer

Non-destructive tests are best done using read replicas. Promoting a read replica in a test environment avoids impacting production. Restoring a backup from Cloud Storage would not test the failover process.

Using HA failover would affect production. Restoring to a new instance from PITR tests recovery but not failover.

1150
MCQhard

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

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

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

Why this answer

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

1151
MCQeasy

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

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

A single-region instance with leader preference set to the application's zone ensures the leader is local, minimizing read latency.

Why this answer

Using a single-region Cloud Spanner instance with leader preference set to the zone where the application runs ensures that the leader replica is in the same zone as the application. Strongly consistent reads are served from the leader, so this configuration minimizes read latency by avoiding cross-zone network round trips. Option B is incorrect because a regional instance does not have separate 'read replicas'; all replicas in a regional instance are read-write, and the leader is already in the same region, but specifying 'read replicas' is misleading and not a valid Spanner configuration.

Multi-region options (A and D) introduce cross-region latency for strongly consistent reads.

Exam trap

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

How to eliminate wrong answers

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

1152
MCQhard

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

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

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

Why this answer

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

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

1153
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1154
MCQhard

A company uses Memorystore for Redis with Standard Tier (replication) and needs to ensure data durability in case of a zone failure. They also need to scale read throughput beyond a single instance. What should they do?

A.Create a cross-region replica and use it for read traffic.
B.Upgrade to a larger machine type with more memory.
C.Enable persistence using AOF and configure a backup schedule.
D.Migrate to Redis Cluster with 3+ shards.
AnswerD

Redis Cluster provides horizontal scaling by sharding data, and with multiple shards across zones, it improves both availability and read throughput.

Why this answer

Memorystore for Redis Standard Tier provides cross-zone replication for high availability. To scale read throughput, they can use Redis Cluster (which shards data across multiple shards) or create read replicas. However, Memorystore does not support read replicas for Redis; instead, Redis Cluster provides horizontal scalability and high availability.

Upgrading to a larger instance scales vertically but not read throughput horizontally. Persistence is not natively supported in Memorystore.

1155
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1156
MCQhard

A financial services company uses Cloud Bigtable to store transaction data. The row key is constructed as customer_id reversed timestamp. The team wants to retrieve the most recent 100 transactions for a specific customer quickly. Which row key design principle is being used to optimize this query?

A.Reverse timestamp
B.Field promotion
C.Salting
D.Composite key
AnswerA

Reverse timestamp orders rows so that recent entries come first for a given customer.

Why this answer

Reverse timestamp in the row key ensures that the most recent transactions for a given customer appear first when scanning rows with that customer prefix.

1157
MCQmedium

A company uses Firestore in Datastore mode. They need to create a composite index for a query that filters on two properties. The query is already running and returning an error that an index is required. What is the correct way to create this index?

A.Create the index using the gcloud datastore indexes create command with a YAML file.
B.Modify the query to use a single filter to avoid needing a composite index.
C.Enable the 'auto-index' feature in the Datastore console.
D.The index will be created automatically based on the query pattern.
AnswerA

Composite indexes are manually defined via a YAML file and created with gcloud.

Why this answer

In Firestore (Datastore mode), composite indexes must be explicitly created before they can be used by queries that filter on multiple properties. The `gcloud datastore indexes create` command with a YAML file is the standard method to define and deploy these indexes, as the Datastore mode does not automatically create composite indexes from query patterns.

Exam trap

Google often tests the misconception that Datastore mode automatically creates composite indexes from query patterns, similar to Firestore Native mode's automatic index creation, but in Datastore mode, composite indexes must be manually defined.

How to eliminate wrong answers

Option B is wrong because modifying the query to use a single filter would change the query's logic and may not return the desired results; the requirement is to support the existing multi-property query, not to alter it. Option C is wrong because there is no 'auto-index' feature in the Datastore console; Firestore in Datastore mode only provides automatic single-property indexes, not composite indexes. Option D is wrong because composite indexes in Datastore mode are not created automatically based on query patterns; they must be explicitly defined and deployed by the user.

1158
MCQeasy

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

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

More memory or key expiration reduces evictions.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1159
MCQeasy

A Cloud SQL for MySQL instance is running low on disk space. You need to increase the storage without downtime. What is the correct approach?

A.Create a new instance with larger storage and migrate the data using mysqldump.
B.Enable automatic storage increase; resize manually is not possible.
C.Stop the instance, resize the attached persistent disk, then restart.
D.Use the gcloud command to resize the storage; the operation is performed online.
AnswerD

Correct. gcloud sql instances patch --storage-size NEW_SIZE resizes online.

Why this answer

Cloud SQL for MySQL supports online storage resizing using the `gcloud sql instances patch` command or the Google Cloud Console, which allows you to increase the storage capacity without any downtime. The operation is performed while the instance remains available, and the underlying persistent disk is resized live, leveraging Google Cloud's live resize capability for Cloud SQL instances.

Exam trap

The trap here is that candidates may assume that any disk resize requires stopping the instance (as with traditional on-premises or some cloud VMs), but Cloud SQL's managed service allows online resizing without downtime, which is a key differentiator tested in the PCDOE exam.

How to eliminate wrong answers

Option A is wrong because creating a new instance and migrating data with mysqldump would require significant downtime during the dump and restore process, and it is unnecessarily complex when a simple online resize is available. Option B is wrong because while automatic storage increase can be enabled, manual resizing is also possible and is the direct solution to the problem; automatic increase only triggers when a threshold is reached, not for immediate manual intervention. Option C is wrong because stopping the instance to resize the disk would cause downtime, which contradicts the requirement to increase storage without downtime; Cloud SQL does not require stopping the instance for storage resizing.

1160
MCQhard

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

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

Views with column selection allow column pruning.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1161
Multi-Selecthard

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

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

Partitioning limits scanned data and reduces costs.

Why this answer

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

Exam trap

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

1162
MCQhard

You need to set up disaster recovery for a Cloud SQL for PostgreSQL instance. The primary instance is in us-central1, and you want a standby in us-west1 that can be promoted to a standalone instance during a regional outage. The solution must minimize data loss and recovery time. Which approach should you take?

A.Configure cross-region automated backups with a retention of 7 days. In the event of a disaster, restore the latest backup to a new instance in us-west1.
B.Set up an on-premise PostgreSQL instance and configure streaming replication from Cloud SQL to the on-premise instance.
C.Create a cross-region read replica in us-west1. During a disaster, promote the replica to a standalone instance.
D.Use gcloud sql instances create with a backup configuration pointing to us-west1, but this does not create a live standby.
AnswerC

A cross-region read replica is the best option: it stays up-to-date (asynchronously) and can be promoted quickly.

Why this answer

Cross-region read replicas in Cloud SQL for PostgreSQL use synchronous replication (for regional replicas, it's asynchronous across regions, but still the best option for DR). Creating a cross-region read replica in us-west1 allows it to be promoted to a standalone instance in DR scenarios. Cross-region backups are point-in-time backups, not a live standby.

External replication is not managed by Cloud SQL.

1163
MCQeasy

A company has a Cloud SQL for PostgreSQL instance and wants to enable point-in-time recovery (PITR) with a recovery window of 5 days. Which configuration step is required?

A.Enable binary logging on the instance
B.Configure a Cloud Storage bucket for WAL archiving
C.Create a cross-region backup replica for disaster recovery
D.Enable automated backups and set backup retention to 5 days
AnswerD

Automated backups must be enabled with a retention period of 5 days to support PITR within that window.

Why this answer

PITR in Cloud SQL for PostgreSQL uses Write-Ahead Logging (WAL) archives. You must enable automated backups and set the backup retention to the desired recovery window (1-7 days). Binary logging is for MySQL, not PostgreSQL.

Cloud Storage archiving is separate. WAL archiving is automatically managed when automated backups are enabled with a retention period.

1164
MCQhard

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

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

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

Why this answer

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

1165
Multi-Selectmedium

A media streaming company is designing a database for user recommendations. They expect high write throughput for user interactions and need to run complex analytical queries on the same data for personalization. They want a fully managed solution with minimal latency for writes. Which TWO services can be combined to meet these requirements?

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

Bigtable provides high write throughput for user interactions.

Why this answer

You can use Cloud Bigtable for high-throughput write ingestion of user interactions, and then export to BigQuery for analytics. Alternatively, Bigtable can be used with Cloud Dataflow for streaming analytics, but the question asks for databases. Another option is AlloyDB with its columnar engine for HTAP, but that may not handle the extreme write throughput of Bigtable.

The best combination is Bigtable for writes and BigQuery for analytics. Firestore is not suitable for high write throughput. Spanner could be used but is more expensive and not as fast for writes as Bigtable for this use case.

1166
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1167
MCQmedium

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

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

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

1168
MCQhard

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

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

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

Why this answer

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

1169
Multi-Selectmedium

A Cloud SQL for MySQL instance is being used for a production application. The team wants to implement a disaster recovery plan that can recover from a regional outage with minimal data loss and automatic failover. Which three steps should they take? (Choose THREE.)

Select 3 answers
A.Enable automated backups with a suitable retention period.
B.Create a read replica in the same region.
C.Increase the storage size to accommodate future growth.
D.Create a cross-region read replica and configure it for failover.
E.Enable binary logging (log_bin) for point-in-time recovery.
AnswersA, D, E

Backups are essential for recovery.

Why this answer

Automated backups in Cloud SQL for MySQL provide a baseline for disaster recovery by creating daily backups that can be restored to a new instance. With a suitable retention period, you can recover from data corruption or accidental deletion, though backups alone do not provide automatic failover or minimal data loss during a regional outage.

Exam trap

The trap here is that candidates confuse read replicas in the same region as providing disaster recovery for regional outages, but they only offer read scaling and high availability within the same region, not cross-region failover.

1170
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1171
MCQhard

A company has a Firestore database in Native mode. They need to run a query that filters on two fields (status and date) and orders by date. The query is slow and returns an error that a matching index is missing. What must the engineer do to resolve this?

A.Enable single-field indexes for both fields; Firestore will automatically use them.
B.Rewrite the query using 'IN' clauses to avoid the need for a composite index.
C.Create a composite index on status and date in the Firebase Console or using gcloud.
D.Change the database to Datastore mode, which does not require indexes.
AnswerC

Firestore in Native mode requires a composite index for queries that filter on multiple fields or combine filters with ordering. The index must include both fields.

Why this answer

Firestore requires a composite index on both the equality filter field (status) and the order field (date) when a query uses equality filters on one field and an order on another. Without this composite index, the query cannot be executed efficiently and returns an error. Creating the composite index via the Firebase Console or gcloud CLI resolves the issue.

Exam trap

Google Cloud often tests the misconception that single-field indexes are automatically combined for multi-field queries, or that using 'IN' clauses bypasses indexing requirements, when in fact composite indexes are mandatory for such queries.

How to eliminate wrong answers

Option A is wrong because single-field indexes are insufficient for queries that filter on one field and order by another; Firestore does not automatically combine them to satisfy the query. Option B is wrong because rewriting the query with 'IN' clauses does not eliminate the need for a composite index; it still requires an index on the field being ordered. Option D is wrong because switching to Datastore mode is unnecessary and does not solve the indexing requirement; Datastore mode also requires composite indexes for similar queries.

1172
MCQmedium

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

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

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

Why this answer

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

1173
Multi-Selecthard

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

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

Enables interleaving and efficient queries.

Why this answer

In Cloud Spanner, designing child table primary keys to start with the parent key (e.g., CustomerId, OrderId) enables efficient key-range scans and colocates related rows, reducing cross-node communication. Option B is correct because denormalizing frequently joined lookup tables into the parent table as repeated fields avoids joins entirely, further reducing latency. Option C is correct because parent-child interleaved tables physically store child rows adjacent to their parent row, minimizing splits and cross-node communication for join queries.

Options D and E are incorrect: secondary indexes do not provide the same physical colocation benefits, and storing foreign keys as JSON arrays in the parent table would complicate queries and fail to leverage Spanner's distributed architecture.

Exam trap

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

1174
MCQmedium

Your Memorystore for Redis instance is used as a session store for a web application. You need to ensure that session data is not lost during a node failure. What should you do?

A.Use a Basic Tier instance with a large maxmemory setting.
B.Configure the instance as Standard Tier (with replication) and schedule periodic exports to Cloud Storage.
C.Enable persistence by setting the 'persistence' parameter to 'rdb' in the instance configuration.
D.Enable AOF persistence in the Memorystore instance.
AnswerD

AOF persistence logs every write operation to disk, enabling near-real-time durability. In the event of a node failure, the AOF log can be replayed to recover data with minimal loss. This is the best option for session data that must not be lost.

Why this answer

Memorystore for Redis supports persistence via RDB snapshotting or AOF (Append-Only File). For minimal data loss during a node failure, AOF persistence is recommended because it logs every write operation, allowing recovery with only a few seconds of data loss (depending on fsync settings). Standard Tier with replication provides high availability but does not persist data to disk, so a full zone failure can cause data loss.

Periodic exports to Cloud Storage have gaps between exports, leading to data loss of up to the export interval. Therefore, enabling AOF persistence is the best approach to prevent data loss during a node failure.

1175
MCQmedium

A media streaming company uses Cloud Bigtable to store user session data with a single cluster in us-east1. They want to add disaster recovery capability with an RPO of no more than 5 minutes and an RTO of under 10 minutes. Which action should they take?

A.Use Cloud SQL cross-region read replicas
B.Deploy a new Bigtable instance in another region and set up dataflow pipelines to replicate data
C.Create an on-demand backup and restore to another region
D.Add a second cluster in a different region with replication, and configure a Cloud DNS health check to redirect traffic
AnswerD

Adding a replicated cluster in another region and using a health-check-based DNS routing can achieve RPO < 5 minutes and RTO < 10 minutes.

Why this answer

Bigtable replication allows adding a second cluster in a different region with asynchronous replication. The replication lag can be within seconds, typically under 5 minutes. For RTO under 10 minutes, manual failover via the Cloud Console or CLI is sufficient; automatic failover is not built-in but can be achieved with external orchestration.

1176
Multi-Selectmedium

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

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

Blue/Green switches between two environments.

Why this answer

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

Exam trap

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

1177
MCQeasy

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

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

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

1178
MCQmedium

Your team manages a Cloud SQL for MySQL instance used by a critical application. You need to ensure the instance is recoverable to any point within the last 4 days, with a Recovery Point Objective (RPO) of under 5 minutes. What configuration steps are required?

A.Enable automated backups and set the backup retention to 4 days. Binary logging is not required because automated backups already capture all changes.
B.Enable binary logging and set the binary log retention to 4 days. Automated backups are optional and not needed for PITR.
C.Create an on-demand backup daily and set binary log retention to 4 days. This provides the same RPO as automated backups with binary logging.
D.Enable automated backups and binary logging. Set the transaction log retention period to 4 days.
AnswerD

Automated backups plus binary logging (with appropriate retention) enables PITR with a 4-day window.

Why this answer

Point-in-time recovery (PITR) in Cloud SQL for MySQL requires both automated backups and binary logging to be enabled. The transaction log retention period (set via transactionLogRetentionDays) determines how far back you can perform PITR, with a maximum of 7 days. Enabling automated backups alone (option A) does not provide PITR because binary logging is needed.

Option B is incorrect because automated backups are required for PITR, and binary logging only without backups does not meet the recovery window. Option C with on-demand daily backups cannot provide an RPO under 5 minutes because binary logging captures ongoing changes. Therefore, option D is correct: enable automated backups, binary logging, and set the transaction log retention to 4 days to meet the 4-day recovery window and RPO under 5 minutes.

1179
MCQeasy

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

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

Index allows efficient range scan and filter.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1180
MCQhard

A Bigtable cluster is configured with SSD storage. The team needs to reduce costs by switching to HDD storage while maintaining the same cluster ID and node count. What is the correct approach?

A.Edit the cluster settings and change the storage type from SSD to HDD.
B.Delete the cluster and recreate it with HDD storage.
C.Create a new Bigtable instance with HDD storage, then use a table export/import to move data.
D.Use gcloud bigtable instances update to change the storage type.
AnswerC

A new cluster with HDD storage is required; data can be migrated via export/import.

Why this answer

Bigtable does not allow in-place modification of storage type (SSD vs. HDD) on an existing cluster. To switch storage, you must create a new instance with HDD storage and migrate data using export/import (e.g., via Cloud Storage and Dataflow).

Option C correctly describes this process, preserving the cluster ID and node count by recreating the instance with the same configuration but HDD storage.

Exam trap

Google often tests the immutability of Bigtable storage type and the misconception that you can simply update it via the console or CLI, leading candidates to choose options A or D.

How to eliminate wrong answers

Option A is wrong because Bigtable does not support editing the storage type of an existing cluster; the storage type is immutable after creation. Option B is wrong because deleting and recreating the cluster would lose the cluster ID and require manual data migration, but the question requires maintaining the same cluster ID, which is not possible with a delete/recreate approach. Option D is wrong because the gcloud bigtable instances update command cannot change the storage type; it only updates display names or labels, not the underlying storage medium.

1181
MCQmedium

A company uses Cloud SQL for MySQL with a 1-hour RPO and 2-hour RTO. They currently rely on automated daily backups. To improve DR capabilities, they want to reduce RPO to 5 minutes while keeping costs low. Which action should they take?

A.Increase backup frequency to every hour.
B.Create a cross-region read replica.
C.Enable point-in-time recovery (PITR) with a binary log retention of 5 minutes.
D.Deploy Cloud SQL HA with a standby in another zone.
AnswerC

PITR uses binary logs to replay transactions, achieving an RPO of seconds to minutes depending on log retention.

Why this answer

Enabling point-in-time recovery (PITR) on Cloud SQL allows restoring to any point in time within the backup retention period, reducing RPO from 24 hours to seconds (limited to binary log retention).

1182
Multi-Selectmedium

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

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

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

Why this answer

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

Exam trap

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

1183
MCQmedium

A data engineer is migrating a large Teradata data warehouse to BigQuery using the Schema Conversion Tool (SCTS). They need to convert BTEQ scripts and Teradata DDL to BigQuery-compatible SQL. After conversion, several date functions are not working correctly. What is the most likely reason?

A.The BigQuery Data Transfer Service is required for date conversion.
B.The Teradata source has a different date format that is incompatible with BigQuery.
C.The SCTS tool did not fully convert the Teradata-specific date functions to BigQuery equivalents.
D.BigQuery does not support date arithmetic.
AnswerC

Some Teradata date functions have no direct BigQuery equivalent and require manual adjustment.

Why this answer

SCTS converts syntax but may not perfectly translate all functions; manual review is often needed for specific date functions.

1184
MCQmedium

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

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

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

Why this answer

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

1185
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1186
MCQmedium

A retail company uses Cloud SQL for MySQL with point-in-time recovery (PITR) enabled. They need to recover the database to a specific second from 2 days ago. The backup retention is set to 7 days. Which action should the engineer take to perform the recovery?

A.Use gcloud sql instances restore-backup with the --point-in-time flag and specify the timestamp, restoring to a new instance.
B.Use mysqldump to export the binary logs and replay them from the backup.
C.Use gcloud sql instances restore-backup with the --async flag and specify the timestamp.
D.Create an on-demand backup from the source instance and restore that backup to a new instance.
AnswerA

This is the correct method: using --point-in-time and restoring to a new instance (since same-instance restore is not supported for PITR).

Why this answer

Point-in-time recovery (PITR) in Cloud SQL uses binary logs to recover to any time within the configured retention period. The engineer can restore to a new instance using gcloud sql instances restore-backup with the --point-in-time flag and specify the exact timestamp. Restoring to the same instance is not supported; only to a new instance.

The --async flag is optional but not required. The recovery is not limited to full backups; binary logs allow precise time recovery.

1187
MCQhard

An organization is migrating an Oracle database to PostgreSQL on Compute Engine. They used Ora2Pg to migrate schema and data. After migration, they want to validate that stored procedures produce correct results. Which tool should they use for unit testing the migrated PL/pgSQL code?

A.pgTAP
B.gcloud sql export
C.pg_dump
D.pglogical
AnswerA

pgTAP provides unit testing capabilities for PostgreSQL stored procedures.

Why this answer

pgTAP is a popular unit testing framework for PostgreSQL that allows writing tests for stored procedures, functions, and other database objects. It is commonly used to validate migrated code.

1188
MCQeasy

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

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

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

Why this answer

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

1189
MCQmedium

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

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

A covering index eliminates sorting and temporary table usage.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1190
Multi-Selecthard

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

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

Clustering improves join efficiency by colocating data.

Why this answer

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

Exam trap

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

1191
Drag & Dropmedium

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

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

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

Why this order

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

1192
MCQmedium

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

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

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

Why this answer

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

1193
MCQmedium

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

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

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

Why this answer

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

Flow control limits throughput. Ordering keys can reduce throughput.

1194
MCQmedium

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

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

Correct: slow burn uses longer window and lower threshold.

Why this answer

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

1195
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1196
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.BigQuery
B.Firestore
C.Cloud Spanner
D.Cloud Bigtable
AnswerD

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

Why this answer

Cloud Bigtable is the correct choice because it is a fully managed, scalable NoSQL database designed for large analytical and operational workloads, such as time-series IoT sensor data. It supports petabyte-scale storage, single-digit millisecond latency for reads and writes, and millions of operations per second using a simple key-value model with timestamps, making it ideal for high-throughput, low-latency time-series data.

Exam trap

Google often tests the distinction between operational (key-value) and analytical (SQL) databases, and the trap here is that candidates confuse BigQuery's ability to handle large data volumes with the need for real-time, low-latency key-value access, or they overestimate Cloud Spanner's suitability for non-relational, high-throughput time-series workloads.

How to eliminate wrong answers

Option A is wrong because BigQuery is a serverless data warehouse optimized for analytical SQL queries on large datasets, not for single-digit millisecond latency at millions of reads per second; it is designed for batch and interactive analytics, not real-time key-value lookups. Option B is wrong because Firestore is a mobile and web document database with strong consistency and real-time updates, but it is not designed for petabyte-scale time-series data or millions of reads per second; its throughput limits and cost model make it unsuitable for high-volume IoT sensor data. Option C is wrong because Cloud Spanner is a globally distributed relational database with strong consistency and horizontal scaling, but it is optimized for transactional workloads with SQL, not for the simple key-value time-series pattern; its latency and throughput characteristics are not as efficient as Bigtable's for this specific use case.

1197
MCQmedium

A company wants to run complex analytical queries on terabytes of sales data with sub-second query response times for dashboards. Data is updated frequently in near real-time. Which combination of services is most appropriate?

A.Cloud Spanner with interleaved tables
B.AlloyDB with columnar engine
C.Cloud SQL for MySQL with read replicas
D.Bigtable with aggregation queries
AnswerB

AlloyDB combines transactional and analytical workloads with columnar engine for fast analytics.

Why this answer

AlloyDB with its columnar engine supports both high-speed transactions and fast analytical queries on the same data, fulfilling near-real-time analytics requirements.

1198
Multi-Selectmedium

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

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

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

Why this answer

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

Exam trap

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

1199
Multi-Selectmedium

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

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

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

1200
MCQhard

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

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

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

Why this answer

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

Exam trap

The trap here is that candidates confuse increasing resources (e.g., larger machine type or longer timeout) with optimizing the build process, failing to recognize that caching with Kaniko and Artifact Registry eliminates redundant downloads from private repositories within the same VPC.

How to eliminate wrong answers

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

Page 15

Page 16 of 20

Page 17