Google Professional Cloud Database Engineer (PCDE) — Questions 526600

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

Page 7

Page 8 of 14

Page 9
526
MCQmedium

You are designing a BigQuery schema for IoT sensor data. The sensor readings have varying fields depending on the sensor type. You want to minimize storage costs and avoid schema maintenance when new sensor types are added. What is the best schema design?

A.Use a separate table per sensor type
B.Store the sensor data in a JSON column
C.Use a schema with a STRUCT containing all possible fields as optional
D.Use a wide table with many nullable columns
AnswerB

JSON provides schema flexibility and cost-effective storage for varying fields.

Why this answer

Option B is correct because storing sensor data in a JSON column leverages BigQuery's native support for semi-structured data (the `JSON` data type), allowing you to ingest records with varying fields without schema changes. This minimizes storage costs by avoiding the overhead of many NULL columns and eliminates the need for schema maintenance when new sensor types are added, as BigQuery can query JSON fields directly using functions like `JSON_EXTRACT` or dot notation.

Exam trap

Cisco often tests the misconception that a STRUCT with optional fields is equivalent to a JSON column, but the trap is that a STRUCT still requires a fixed schema definition, whereas JSON allows fully dynamic fields without schema changes.

How to eliminate wrong answers

Option A is wrong because using a separate table per sensor type increases storage costs (due to table metadata overhead) and requires schema maintenance (creating new tables for each new sensor type), which contradicts the goal of minimizing maintenance. Option C is wrong because a STRUCT with all possible fields as optional still requires you to know and define every potential field in advance, leading to schema maintenance when new sensor types introduce new fields; it also incurs storage cost for NULL values in unused fields. Option D is wrong because a wide table with many nullable columns wastes storage on NULL values (BigQuery charges for NULL storage in fixed-length types) and requires schema updates to add columns for new sensor types, failing the 'avoid schema maintenance' requirement.

527
MCQmedium

A DevOps team is bootstrapping a new Google Cloud organization. They want to enforce that all Compute Engine instances must use Shielded VM features (Secure Boot, vTPM, Integrity Monitoring). Which organization policy should they set at the organization level?

A.Set the 'constraints/compute.disableSerialPortAccess' policy to true.
B.Set the 'constraints/compute.requireOsLogin' policy to true.
C.Set the 'constraints/compute.requireShieldedVm' policy to true.
D.Set the 'iam.allowedPolicyMemberDomains' policy to restrict membership.
AnswerC

Correct. This policy requires Shielded VM on all VMs.

Why this answer

The 'constraints/compute.requireShieldedVm' policy enforces that all new VMs must have Shielded VM enabled. Policies are set at the organization, folder, or project level using the Org Policy Service.

528
Multi-Selecthard

In Cloud Spanner, which TWO strategies can help reduce read latency for globally distributed applications?

Select 2 answers
A.Enable follower reads
B.Use stale reads
C.Use a multi-region configuration with a default leader
D.Use database partitioning
E.Increase the number of nodes
AnswersA, B

Follower reads can serve reads from the nearest replica.

Why this answer

Option A is correct because follower reads allow read requests to be served by any replica in a Cloud Spanner multi-region configuration, not just the leader replica. This reduces read latency by enabling reads to be processed from a replica that is geographically closer to the client, without incurring the round-trip time to the leader. Follower reads are particularly effective for globally distributed applications where read consistency can be slightly relaxed.

Exam trap

Google Cloud often tests the misconception that any multi-region configuration automatically reduces read latency, when in fact you must explicitly enable follower reads or stale reads to avoid routing reads to the leader replica.

529
MCQhard

A financial company uses Cloud SQL for PostgreSQL to store transaction data. They need to create a materialized view that aggregates daily sales for a BI dashboard. The underlying transaction table is updated continuously. Which approach ensures the materialized view remains up to date without manual intervention?

A.Use BigQuery federated query to directly query the Cloud SQL table
B.Use a Cloud SQL read replica and create the materialized view on the replica
C.Schedule a Cloud Function via Cloud Scheduler to run REFRESH MATERIALIZED VIEW periodically
D.Add a trigger on the base table to refresh the materialized view on each update
AnswerC

This provides automated periodic refreshes without manual effort.

Why this answer

Option C is correct because Cloud SQL for PostgreSQL does not support automatic materialized view refresh. The only way to keep a materialized view up to date without manual intervention is to schedule a periodic refresh using Cloud Scheduler to invoke a Cloud Function that executes the REFRESH MATERIALIZED VIEW command. This approach balances freshness with resource cost, as refreshing on every transaction would be too expensive.

Exam trap

Google Cloud often tests the misconception that materialized views in PostgreSQL can be automatically refreshed via triggers or that read replicas support materialized view creation, leading candidates to pick options that ignore the fundamental write-lock and replication limitations of Cloud SQL for PostgreSQL.

How to eliminate wrong answers

Option A is wrong because BigQuery federated queries read the Cloud SQL table directly without creating a materialized view, so they do not provide the pre-aggregated, fast-query performance that a materialized view offers, and they still incur query-time overhead. Option B is wrong because a Cloud SQL read replica is a read-only copy of the database; you cannot create a materialized view on a replica because PostgreSQL does not support materialized views on replicas (they require write access to store the view data). Option D is wrong because adding a trigger to refresh the materialized view on each update would cause severe performance degradation and is not supported in Cloud SQL for PostgreSQL—triggers cannot execute REFRESH MATERIALIZED VIEW directly, and even if they could, the overhead of refreshing on every row change would be prohibitive.

530
MCQmedium

You are running a Memorystore for Redis instance with a high write volume. You notice that the eviction rate is high and the cache hit ratio has dropped significantly. Which configuration change would most directly reduce the eviction rate?

A.Use many small keys instead of a few large keys.
B.Decrease the maxmemory setting to force earlier eviction.
C.Set maxmemory-policy to noeviction.
D.Change maxmemory-policy to allkeys-lru.
AnswerD

LRU eviction removes least recently used keys, which can improve cache efficiency.

Why this answer

Option D is correct because setting `maxmemory-policy` to `allkeys-lru` tells Redis to evict the least recently used keys from the entire keyspace when memory is full. This directly reduces the eviction rate by ensuring that only the least accessed data is removed, preserving the most frequently accessed data and improving the cache hit ratio. In a high-write-volume scenario, this policy adapts to access patterns and minimizes unnecessary evictions of hot data.

Exam trap

The trap here is that candidates often confuse 'reducing eviction rate' with 'preventing eviction entirely' and choose `noeviction`, not realizing that `noeviction` causes write failures instead of reducing evictions, while `allkeys-lru` actively manages memory to keep evictions low by targeting only cold keys.

How to eliminate wrong answers

Option A is wrong because using many small keys instead of a few large keys does not reduce the eviction rate; it may actually increase memory overhead due to per-key metadata and does not address the root cause of memory pressure. Option B is wrong because decreasing the `maxmemory` setting forces earlier eviction, which would increase the eviction rate, not reduce it. Option C is wrong because setting `maxmemory-policy` to `noeviction` prevents any eviction, causing write operations to fail with an OOM error when memory is full, which does not reduce the eviction rate but instead breaks the application.

531
MCQeasy

A financial BI application stores monetary values such as revenue and tax amounts. Which BigQuery data type should be used to ensure accuracy in calculations?

A.Use STRING and parse numbers as needed
B.Use INT64 and store amounts in cents
C.Use FLOAT64
D.Use NUMERIC or BIGNUMERIC
AnswerD

Exact numeric types guarantee precision for decimals, essential for financial data.

Why this answer

Option D is correct because NUMERIC and BIGNUMERIC are exact numeric types with fixed precision and scale, designed to avoid floating-point rounding errors. In BigQuery, monetary calculations require exact decimal arithmetic, and these types provide up to 38 (NUMERIC) or 76 (BIGNUMERIC) digits of precision, ensuring accuracy for revenue and tax computations.

Exam trap

Google Cloud often tests the misconception that FLOAT64 is acceptable for financial data because it handles decimals, but the trap is that floating-point arithmetic is inherently imprecise for exact monetary calculations, leading to subtle rounding errors that fail audit requirements.

How to eliminate wrong answers

Option A is wrong because storing monetary values as STRING forces parsing on every query, introduces conversion overhead, and loses the ability to perform direct arithmetic operations without explicit casting, which is inefficient and error-prone. Option B is wrong because storing amounts in cents as INT64, while avoiding floating-point issues, requires manual scaling and can overflow for large values (e.g., billions of dollars in cents exceed INT64 max of ~9.2e18) and complicates tax calculations involving fractions of a cent. Option C is wrong because FLOAT64 is a floating-point type that introduces binary rounding errors (e.g., 0.1 + 0.2 != 0.3), which can cause cumulative inaccuracies in financial calculations and violate accounting standards.

532
Drag & Dropmedium

Order the steps to perform a disaster recovery drill for a Cloud Spanner database using backups.

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

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

Why this order

The correct sequence for a Cloud Spanner disaster recovery drill using backups is: first create a backup, then restore it to another region. After restoration, verify data integrity, then update application configurations to point to the restored database, and finally test the application to ensure failover works. This order ensures data consistency and minimizes risk.

533
Multi-Selecthard

Which THREE methods are effective for improving query performance in BigQuery for BI workloads?

Select 3 answers
A.Clustering on frequently filtered columns
B.Replacing joins with subqueries
C.Partitioning on a date column
D.Using SELECT * in queries
E.Using pre-aggregated summary tables
AnswersA, C, E

Clustering allows BigQuery to skip reading blocks that don't match filter conditions.

Why this answer

Option A is correct because clustering on frequently filtered columns physically co-locates related data within blocks, significantly reducing the amount of data scanned for queries with filter predicates. This is especially effective for BI workloads that often filter on high-cardinality columns like customer ID or transaction type, as it avoids full table scans and improves query performance without additional storage costs.

Exam trap

Google Cloud often tests the misconception that subqueries are always more efficient than joins, but in BigQuery, joins are optimized for distributed processing while subqueries can cause performance degradation due to lack of parallelism.

534
Multi-Selectmedium

A Cloud SQL for PostgreSQL instance is experiencing high replication lag between primary and read replica. Which TWO actions would reduce the lag?

Select 2 answers
A.Reduce the value of `max_wal_size`.
B.Increase the replica's machine size.
C.Place the replica in the same zone as the primary.
D.Use a higher number of read replicas.
E.Enable synchronous replication.
AnswersB, C

More CPU and memory on the replica help it apply WAL more quickly, reducing lag.

Why this answer

Increasing the replica's machine size (Option B) reduces replication lag by providing more CPU and memory resources to apply WAL changes faster. Placing the replica in the same zone as the primary (Option C) minimizes network latency between the instances, which directly reduces the time for WAL data to travel from primary to replica, thus lowering lag.

Exam trap

Cisco often tests the misconception that reducing `max_wal_size` or adding more replicas will reduce lag, when in fact these actions can worsen performance or have no effect on the specific replica's apply rate.

535
Multi-Selectmedium

A DevOps team needs to set up alerting for a critical application that runs on Compute Engine. They want to be notified if the application process crashes (i.e., stops sending heartbeats) for more than 5 minutes. The application emits a custom metric 'app_heartbeat' as a GAUGE with value 1 every 60 seconds. Which TWO configurations should they use? (Choose 2)

Select 2 answers
A.Alignment period: 60 seconds
B.Duration: 5 minutes
C.Metric threshold condition: threshold < 1
D.Reducer: MEAN
E.Metric absent condition: for 'app_heartbeat' metric
AnswersB, E

The duration for which the metric must be absent (or condition met) before alerting.

Why this answer

To detect a crash, you need a metric absent condition (no data for 5 minutes) because the gauge value will stop reporting. Setting the duration to 5 minutes ensures timely notification. A threshold condition on the gauge value would not trigger if the value stays at 1.

The alignment period and reducer are not relevant for absent conditions.

536
Multi-Selecthard

Which THREE techniques can improve query performance in BigQuery for BI workloads? (Choose three.)

Select 3 answers
A.Use approximate aggregation functions when exact results are not required.
B.Avoid SELECT * in production queries; select only needed columns.
C.Use SELECT * with LIMIT to preview data.
D.Use ORDER BY on large result sets without LIMIT.
E.Cluster the table on columns frequently used in WHERE clauses.
AnswersA, B, E

Approximate functions use less memory and are faster.

Why this answer

Option A is correct because approximate aggregation functions (e.g., APPROX_COUNT_DISTINCT, APPROX_QUANTILES) in BigQuery use HyperLogLog++ algorithms to return near-exact results with significantly lower resource consumption and faster execution. For BI workloads where exact precision is not critical (e.g., dashboard approximations), this reduces query cost and latency.

Exam trap

Google Cloud often tests the misconception that SELECT * with LIMIT is a performance optimization, when in fact it still incurs full column scan costs, and that ORDER BY without LIMIT is acceptable for large datasets, ignoring BigQuery's requirement for a LIMIT clause to enable distributed sorting.

537
MCQhard

A company uses Terraform with remote state stored in GCS. They want to prevent concurrent `terraform apply` runs for the same configuration to avoid state corruption. Which feature should they use?

A.Set the `-lock` flag to `true` in the Terraform CLI command.
B.Enable state locking in the GCS bucket by setting `force_destroy = false`.
C.Use Terraform workspaces to isolate runs.
D.State locking is automatically enabled when using a GCS backend; no additional configuration is needed.
AnswerD

GCS backend supports native state locking.

Why this answer

Terraform state locking is automatically enabled when using a backend that supports it, like GCS. GCS uses object versioning and a lock file to prevent concurrent modifications. Workspaces and remote execution are unrelated to locking.

538
Multi-Selecthard

A financial services company needs to design a BigQuery data model for real-time fraud detection. Data arrives from multiple streaming sources and must be joined with historical customer profiles (10 TB) and transaction lookup tables (500 GB). Which TWO design considerations are most important to minimize query latency and cost?

Select 2 answers
A.Use time-based partitioning on the historical customer table and cluster on customer_id.
B.Partition streaming data by ingestion time and cluster by customer_id and transaction_type.
C.Schedule a nightly script to recluster tables based on query patterns.
D.Use a single table for all streaming data without partitioning to avoid partition management overhead.
E.Denormalize all historical and lookup data into a single wide table.
AnswersA, B

Time-based partitioning reduces scan for recent customers, and clustering on join key speeds up the join.

Why this answer

Option A is correct because time-based partitioning on the historical customer table (10 TB) allows BigQuery to prune irrelevant partitions during queries, reducing the amount of data scanned and thus lowering cost and latency. Clustering on customer_id further optimizes joins with streaming data by colocating related rows, minimizing shuffle overhead.

Exam trap

Google Cloud often tests the misconception that manual reclustering is required for performance, when in fact BigQuery's automatic reclustering handles it transparently, and that denormalization is always beneficial for joins, ignoring the storage and maintenance costs in large-scale systems.

539
MCQmedium

You want to visualize the 99th percentile latency of a service on a dashboard. The metric is a distribution metric. Which reducer should you use in the chart configuration?

A.MEAN
B.SUM
C.99TH_PERCENTILE
D.COUNT
AnswerC

This reducer computes the 99th percentile.

Why this answer

The 99th percentile is a specific percentile, not a simple aggregation like MEAN, SUM, or COUNT. Cloud Monitoring charts can use percentile reducers. Among the options, '99TH_PERCENTILE' is the correct one.

540
MCQhard

A company uses Cloud Spanner for a global application. They notice high write latency and occasional hotspotting on a table with a monotonically increasing integer primary key. Which schema design change would best prevent hotspotting while maintaining read performance?

A.Use a UUID as the primary key.
B.Create an interleaved table with the primary key as the parent.
C.Add a secondary index on the primary key.
D.Use bit-reversed indexes for the primary key.
AnswerD

Bit-reversed indexes spread sequential keys across the key space, avoiding hotspotting on a single split.

Why this answer

Using a hash prefix of the primary key distributes writes across different splits, preventing hotspots. UUIDs also work, but bit-reverse is better for sequential keys. Interleaved tables do not help with hotspotting.

541
MCQmedium

During an incident, the incident commander delegates tasks to multiple teams. Which communication model is MOST effective to reduce noise?

A.Use email for updates to avoid real-time noise.
B.Use a single incident channel where all teams post updates.
C.Each team communicates in separate channels.
D.All updates go through the incident commander only.
AnswerB

A single channel ensures everyone sees updates and reduces cross-talk.

Why this answer

The recommended approach is to use a single communication channel (e.g., a dedicated chat room) for all incident-related updates, and the incident commander coordinates via that channel.

542
MCQeasy

A DevOps engineer wants to create a dashboard that shows the number of 5xx errors per service over time. The errors are logged in Cloud Logging. What is the most efficient way to create this dashboard?

A.Create a log-based counter metric for 5xx errors, then add a chart in Cloud Monitoring using that metric.
B.Write a custom application that sends the error count to Cloud Monitoring as a custom metric via API.
C.Export logs to BigQuery and use Data Studio to create a dashboard.
D.Use Cloud Logging's metrics explorer to create a chart and embed it in a dashboard.
AnswerA

Log-based metrics are efficient and can be used in dashboards directly.

Why this answer

First, create a log-based metric that counts log entries with severity ERROR and status code 5xx. Then, in Cloud Monitoring, create a dashboard with a chart using that metric, grouped by service. This avoids querying logs directly and provides a reusable metric.

543
MCQmedium

A DBA notices high query cache lock contention on this Cloud SQL for MySQL instance. Which configuration change should be recommended?

A.Set query_cache_type=0
B.Decrease max_connections
C.Increase innodb_buffer_pool_size
D.Increase query_cache_size
AnswerA

Disabling query cache removes lock contention entirely.

Why this answer

Query cache lock contention occurs when multiple threads try to access the query cache simultaneously, causing serialization. Setting `query_cache_type=0` disables the query cache entirely, eliminating the lock contention. This is the recommended fix because MySQL 8.0 deprecated the query cache due to scalability issues, and Cloud SQL for MySQL instances benefit from removing this bottleneck.

Exam trap

Google Cloud often tests the misconception that increasing the size of a cache or buffer always improves performance, but here increasing `query_cache_size` exacerbates lock contention, making the problem worse.

How to eliminate wrong answers

Option B is wrong because decreasing `max_connections` reduces the number of concurrent connections but does not address the internal locking mechanism of the query cache; contention is a lock-level issue, not a connection-level one. Option C is wrong because increasing `innodb_buffer_pool_size` improves InnoDB data caching and reduces disk I/O, but it does not affect query cache locks, which are a separate memory structure. Option D is wrong because increasing `query_cache_size` only allocates more memory to the query cache, which can actually worsen contention by increasing the time spent scanning or invalidating cache entries under high concurrency.

544
MCQmedium

Your Bigtable cluster is showing high read latency for row key lookups. The application accesses rows with keys in the format 'user_id#timestamp'. You notice that most reads are for recent timestamps. Which optimization should you implement?

A.Increase the number of nodes in the cluster
B.Reverse the row key order to start with the timestamp
C.Configure single cluster routing to reduce cross-cluster latency
D.Use a scan with a prefix filter instead of point reads
AnswerB

This distributes recent writes/reads across tablet servers.

Why this answer

High read latency for recent timestamps occurs because Bigtable stores rows in lexicographic order by row key. With the format 'user_id#timestamp', older timestamps appear first, causing recent data to be scattered across tablets and requiring more seeks. Reversing the row key to start with the timestamp (e.g., 'timestamp#user_id') groups recent data together in contiguous tablets, enabling faster point lookups and reducing latency.

Exam trap

Google Cloud often tests the misconception that scaling nodes (Option A) solves all performance issues, but the trap here is that row key design directly impacts data locality and latency, making key ordering the primary optimization for time-based access patterns.

How to eliminate wrong answers

Option A is wrong because increasing nodes improves throughput and load distribution but does not address the root cause of scattered recent data due to row key ordering; it may even increase latency due to additional network hops. Option C is wrong because single cluster routing reduces cross-cluster latency in multi-cluster setups, but the question does not mention multiple clusters; the latency issue is within a single cluster due to row key design. Option D is wrong because using a scan with a prefix filter is less efficient than point reads for known row keys; it scans unnecessary rows and increases latency, whereas the goal is to optimize point lookups for recent timestamps.

545
Matchingmedium

Match each Cloud SQL high-availability feature to its description.

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

Concepts
Matches

Synchronous replication across two zones

Standby instance in a different zone for automatic failover

Asynchronous replica for read offloading

Promotion of standby on primary failure

Point-in-time recovery and disaster recovery

Why these pairings

Automatic failover switches to a standby zone on failure, read replicas provide read-only copies for scaling, and point-in-time recovery allows restoring to any time within retention. Common confusions mix automatic failover with read replicas.

546
MCQeasy

An engineering team wants to automatically build a Docker image every time a developer pushes code to the main branch of their GitHub repository. They are using Cloud Build. Which configuration should they use?

A.Cloud Build trigger with manual invocation
B.Cloud Build trigger with push event and branch pattern 'main'
C.Cloud Build trigger with scheduled event
D.Cloud Build trigger with pull request event
AnswerB

This is the correct way to trigger builds on push to main branch.

Why this answer

Cloud Build build triggers can be configured to respond to push events on a branch. The trigger is created in the Cloud Console or via gcloud and specifies the repository and branch pattern.

547
MCQhard

The query above fails with 'Resources exceeded: UDF out of memory' on a large table. What is the best way to fix this?

A.Rewrite the function as a SQL UDF to avoid JavaScript overhead
B.Add a GROUP BY clause to reduce the number of rows processed
C.Convert the temporary UDF to a persistent UDF
D.Increase the memory allocation for JavaScript UDFs
AnswerA

SQL UDFs run natively in BigQuery's execution engine and do not have the same memory constraints.

Why this answer

Option A is correct because JavaScript UDFs in BigQuery run in a sandbox with limited memory (typically 6 MB per UDF instance). When processing a large table, the UDF may exceed this memory due to per-row overhead or large intermediate results. Rewriting the function as a SQL UDF eliminates JavaScript overhead and runs natively within BigQuery's distributed execution engine, which can handle larger datasets without memory constraints.

Exam trap

Google Cloud often tests the misconception that memory errors in UDFs can be fixed by increasing resources or changing UDF persistence, when the real limitation is the fixed JavaScript sandbox memory that can only be avoided by using SQL UDFs.

How to eliminate wrong answers

Option B is wrong because adding a GROUP BY clause does not reduce the number of rows processed by the UDF; it only aggregates results after the UDF runs, so the memory issue persists. Option C is wrong because converting a temporary UDF to a persistent UDF does not change the execution environment or memory limits; both types of JavaScript UDFs share the same sandbox memory constraints. Option D is wrong because BigQuery does not allow users to increase memory allocation for JavaScript UDFs; the sandbox memory is fixed and cannot be adjusted.

548
Multi-Selecteasy

A company is building a microservices architecture and needs to choose a database per service. Which THREE factors should they consider?

Select 3 answers
A.Consistency requirements
B.Preferred programming language
C.Expected query patterns
D.Data size and growth rate
E.Number of developers
AnswersA, C, D

Different services may need strong or eventual consistency, affecting database choice (e.g., Spanner vs. Bigtable).

Why this answer

Consistency requirements are critical because different databases offer varying consistency models (e.g., ACID vs. BASE). For example, a financial transaction service requiring strong consistency would need a relational database like PostgreSQL, while a social media feed could tolerate eventual consistency with a NoSQL database like Cassandra.

Choosing based on consistency ensures data integrity aligns with business needs.

Exam trap

Google Cloud often tests the misconception that programming language or team size should drive database choice, but the correct focus is on data-specific factors like consistency, query patterns, and scalability.

549
MCQeasy

An engineer wants to trigger a Cloud Build pipeline whenever a new pull request(PR) is opened against the 'main' branch of a repository. Which type of build trigger should they configure?

A.Pull Request trigger
B.Manual trigger
C.Scheduled trigger (cron)
D.Push trigger on branch
AnswerA

Pull Request triggers automatically run builds when a PR is created or updated.

Why this answer

Cloud Build supports pull request triggers that automatically run a build when a PR is created or updated. This is specifically called a 'Pull Request' trigger.

550
MCQhard

A BI team is designing a BigQuery table for a sales dashboard that queries daily sales by product category and region. The dashboard often filters on a specific date range and a specific region. Which combination of partitioning and clustering should be used?

A.Partition by region, cluster by date
B.Use only clustering on date and region without partitioning
C.Partition by date, cluster by region
D.Partition by month, cluster by date
AnswerC

Partitioning by date fine-tunes the scan to the date range; clustering by region organizes data to skip irrelevant blocks.

Why this answer

Partitioning by date (e.g., on a DATE or TIMESTAMP column) allows BigQuery to prune entire partitions when the dashboard filters on a specific date range, reducing the amount of data scanned. Clustering by region then sorts the data within each partition by region, enabling efficient block-level pruning when the dashboard filters on a specific region. This combination optimizes both the date range and region filters, which are the most common query patterns for this sales dashboard.

Exam trap

Google Cloud often tests the misconception that partitioning can be applied to any column type (like region) or that clustering alone is sufficient for date range filtering, leading candidates to overlook the mandatory requirement that partitioning must be on a DATE, TIMESTAMP, or integer column and that clustering complements but does not replace partitioning for range-based pruning.

How to eliminate wrong answers

Option A is wrong because partitioning by region is not supported in BigQuery (partitioning only supports DATE, TIMESTAMP, or integer columns, not string columns like region), and clustering by date would not provide the same pruning benefit for date range filters as partitioning by date does. Option B is wrong because using only clustering without partitioning means every query must scan all partitions (i.e., the entire table), even when filtering on a date range, leading to higher costs and slower performance compared to a partitioned table. Option D is wrong because partitioning by month is too coarse for a dashboard that often filters on a specific date range (e.g., a few days or weeks), resulting in scanning entire monthly partitions even when only a few days are needed, and clustering by date within a monthly partition is redundant since date is already the partition key.

551
MCQhard

Your organization uses Cloud SQL for PostgreSQL for a reporting application with read-heavy workloads. Queries are slow and you need to reduce load on the primary instance. You also need to ensure that all read queries from the reporting tool are isolated from the primary. What should you do?

A.Create a Cloud SQL read replica, and configure the reporting tool to connect to the replica's IP address.
B.Create a Cloud SQL clone and point the reporting tool to the clone.
C.Enable connection pooling using Cloud SQL Auth Proxy and PgBouncer on the primary instance.
D.Configure the reporting tool to use the primary instance with a lower priority.
AnswerA

Read replicas offload read traffic and isolate reporting queries from the primary.

Why this answer

Cloud SQL read replicas serve read traffic and offload the primary. For isolation, the reporting tool must connect to the replica's IP. Cloud SQL Auth Proxy is a secure tunnel, but does not provide connection pooling.

PgBouncer can be used with proxies for connection pooling, but the question asks for isolation, which is achieved by pointing the reporting tool to the replica. The best answer is to create a read replica and configure the reporting tool to connect to it.

552
MCQhard

A company uses Cloud Build to build a multi-module Maven project. They want to run unit tests for module A and integration tests for module B in parallel. In cloudbuild.yaml, how should they configure the steps to run in parallel?

A.steps: - id: 'unit' waitFor: ['-'] ... - id: 'integration' waitFor: ['-'] ...
B.steps: - id: 'unit' ... - id: 'integration' waitFor: ['-'] ...
C.steps: - id: 'unit' waitFor: ['previous'] ... - id: 'integration' waitFor: ['unit'] ...
D.Steps run sequentially by default; parallelism is not supported.
AnswerA

Both steps with waitFor: ['-'] start simultaneously (parallel).

Why this answer

Option A is correct because in Cloud Build, setting `waitFor: ['-']` on a step makes it start immediately without waiting for any other step, effectively allowing both the 'unit' and 'integration' steps to run in parallel. This configuration meets the requirement to run unit tests for module A and integration tests for module B concurrently.

Exam trap

Cisco often tests the misconception that Cloud Build does not support parallelism or that `waitFor: ['-']` is only for the first step, leading candidates to choose sequential execution options or invalid syntax like `waitFor: ['previous']`.

How to eliminate wrong answers

Option B is wrong because the 'unit' step does not have `waitFor: ['-']`, so it will wait for the default previous step (if any) or run sequentially, preventing true parallelism. Option C is wrong because `waitFor: ['previous']` is not a valid Cloud Build syntax; the correct way to reference the previous step is by its ID, and here the 'integration' step waits for 'unit', forcing sequential execution. Option D is wrong because Cloud Build does support parallel execution by using `waitFor: ['-']` on multiple steps, so the claim that parallelism is not supported is incorrect.

553
MCQmedium

A DevOps engineer is setting up CI/CD for a microservice application. They want to use Cloud Build to deploy to Google Kubernetes Engine (GKE) only if the build passes tests. Which Cloud Build configuration approach should they use?

A.Use two separate Cloud Build triggers: one for testing and one for deployment, and manually trigger the deployment after tests pass.
B.Create a cloudbuild.yaml with a test step that fails the build if tests fail, and a subsequent deploy step that runs only if all previous steps succeed.
C.Configure a single Cloud Build trigger that runs test and deploy steps in parallel.
D.Use Cloud Functions to orchestrate testing and deployment via separate Cloud Build API calls.
AnswerB

Cloud Build executes steps sequentially; if a step fails, the build fails and subsequent steps are skipped, ensuring only successful tests lead to deployment.

Why this answer

Cloud Build triggers can be configured to run a build config (cloudbuild.yaml) that includes steps for testing and deployment. Conditional deployment can be handled by the build steps themselves.

554
MCQmedium

A data engineer runs a BigQuery query that joins a large fact table with a small lookup table. The query processes 1 TB of data and takes 30 seconds. The engineer wants to reduce the amount of data processed. Which optimization technique is MOST effective?

A.Increase the number of slots available for the query.
B.Use a WITH clause to pre-filter the fact table before joining.
C.Cluster the lookup table on the join key.
D.Materialize the lookup table as a separate table with the same data.
AnswerB

Pre-filtering reduces the amount of data from the fact table that needs to be joined.

Why this answer

Option B is correct because pre-filtering the fact table with a WITH clause (CTE) reduces the amount of data scanned and processed before the join occurs. Since the fact table is large (1 TB), applying filters early minimizes the data shuffled and joined, directly reducing the bytes billed in BigQuery. This is a form of predicate pushdown that leverages BigQuery's columnar storage and dynamic query optimization.

Exam trap

The trap here is that candidates confuse query performance (speed) with data processed (cost), often choosing to increase slots (Option A) which only reduces elapsed time but does not lower the bytes billed.

How to eliminate wrong answers

Option A is wrong because increasing slots only speeds up query execution (reduces elapsed time) but does not reduce the amount of data processed; the query still scans 1 TB. Option C is wrong because clustering the lookup table on the join key improves join performance by reducing shuffle, but the lookup table is already small, so the impact on data processed is negligible; the bottleneck is the large fact table. Option D is wrong because materializing the lookup table as a separate table with the same data does not change the amount of data processed; it only duplicates storage without reducing the fact table scan.

555
MCQmedium

A team is using Cloud Spanner and wants to create a secondary index that is stored with the base table data to avoid interleaved joins. Which option should they use when creating the index?

A.Create a stored generated column as the index key.
B.Use a hash index instead of a secondary index.
C.Use the `INTERLEAVE IN` clause when creating the index.
D.Add `spanner_interleave_in_parent = true` in the index creation.
AnswerD

This option stores the index with its parent table, optimizing joins.

Why this answer

The `spanner_interleave_in_parent` option stores the index interleaved within the parent table, improving join performance for parent-child relationships.

556
MCQmedium

An organization uses Artifact Registry to store Docker images. They want to enforce that only images that have passed vulnerability scanning and are signed can be deployed to GKE. Which two services should they use together?

A.Cloud Deploy and Cloud Run
B.Cloud Build and Artifact Registry
C.Binary Authorization and Container Scanning API
D.Security Command Center and Cloud Asset Inventory
AnswerC

Binary Authorization enforces signing; Container Analysis provides vulnerability scanning.

Why this answer

Binary Authorization enforces that only signed and verified container images can be deployed to GKE, while the Container Scanning API (now part of Artifact Analysis) performs vulnerability scanning on images stored in Artifact Registry. Together, they ensure that only images that have passed vulnerability scanning and are cryptographically signed can be deployed, meeting the organization's requirements.

Exam trap

Cisco often tests the distinction between services that perform an action (like scanning or signing) versus services that enforce a policy based on that action, so candidates mistakenly pick Cloud Build and Artifact Registry (Option B) because they handle scanning and storage, but they lack the enforcement mechanism that Binary Authorization provides.

How to eliminate wrong answers

Option A is wrong because Cloud Deploy is a continuous delivery service for deploying to GKE, Cloud Run, or GKE clusters, but it does not enforce vulnerability scanning or image signing; Cloud Run is a serverless compute platform, not a security enforcement service. Option B is wrong because Cloud Build is a CI/CD service that can build and push images to Artifact Registry, but it does not provide the enforcement of signed images or vulnerability scanning policies at deployment time; Artifact Registry is the storage repository, not a policy enforcement service. Option D is wrong because Security Command Center is a security and risk management platform for threat detection and compliance, and Cloud Asset Inventory provides asset metadata and history, but neither enforces image signing or vulnerability scanning policies on GKE deployments.

557
MCQmedium

Your team uses Cloud Monitoring to alert on high CPU usage for Compute Engine instances. You want to be notified via email and Slack. You have created a notification channel for email. What must you do to also notify Slack?

A.Create a second email notification channel with the Slack email integration address.
B.Create a Cloud Pub/Sub notification channel and set up a subscription to post messages to Slack via webhook.
C.Use Cloud Logging to forward logs to Slack directly.
D.Install the Stackdriver Slack app and configure it to receive alerts via Cloud Monitoring API.
AnswerB

This is the correct approach as described.

Why this answer

Slack notifications in Cloud Monitoring are delivered via a Cloud Pub/Sub topic which then routes to Slack via a webhook. You need to create a Pub/Sub notification channel and configure the subscription to post to Slack.

558
MCQmedium

A Cloud SQL for MySQL instance requires a patch update. How can you minimize downtime during the update?

A.Apply the patch without restart
B.Use database migration to a new instance
C.Failover to a read replica during the update
D.Schedule the maintenance during a maintenance window
AnswerD

Scheduling maintenance allows Cloud SQL to perform rolling updates with minimal downtime, especially with HA enabled.

Why this answer

Option D is correct because Cloud SQL for MySQL uses a maintenance window to schedule patching during a period of low traffic, minimizing user impact. While a restart is typically required for patch application, the maintenance window allows you to control when that restart occurs, reducing downtime exposure. This is the standard recommended approach for managed database patching in Google Cloud.

Exam trap

Google Cloud often tests the misconception that read replicas can be used for failover during patching, but in Cloud SQL for MySQL, read replicas do not support automatic failover for patching—only regional failover replicas in a high-availability configuration can, and even then, the maintenance window is the key to minimizing downtime.

How to eliminate wrong answers

Option A is wrong because Cloud SQL for MySQL patch updates typically require a restart of the instance to apply system-level changes, and there is no 'apply without restart' feature for such updates. Option B is wrong because database migration to a new instance involves creating and copying data to a fresh instance, which incurs significant downtime during the migration process and is not a minimal-downtime approach for a simple patch. Option C is wrong because Cloud SQL for MySQL read replicas are not used for failover during patching; they are for read scaling and high availability, but the primary instance must still be patched, and failover to a replica does not eliminate the need for a restart on the primary.

559
Multi-Selectmedium

A Cloud Database Engineer is designing a schema for an e-commerce application on Cloud Spanner. The application requires high read throughput for product queries by category and price range, and must support global scale with strong consistency. The team is considering primary key design and interleaved tables. Which TWO design considerations should the engineer apply? (Choose TWO.)

Select 2 answers
A.Define secondary indexes on price and category columns to support range queries without considering the primary key design.
B.Use a timestamp as the first part of the primary key to enable time-based partitioning and efficient range scans.
C.Define interleaved tables for all related entities, even if they are not always accessed together, to reduce joins.
D.Use a primary key that starts with the category column to colocate product data for efficient queries by category.
E.Create an interleaved table for product variants under the product table, since variants are always queried with the parent product.
AnswersD, E

Leading with category allows Spanner to distribute rows by category, improving locality for queries filtering by category.

Why this answer

Option D is correct because colocating product data by category in the primary key enables efficient range scans on category and price, as Cloud Spanner stores rows in sorted order by primary key. This design minimizes cross-node fan-out for queries filtering by category, directly supporting high read throughput at global scale with strong consistency.

Exam trap

Google Cloud often tests the misconception that secondary indexes are a universal solution for query performance, ignoring that primary key design and interleaved tables are critical for colocation and avoiding cross-node fan-out in globally distributed databases like Cloud Spanner.

560
Multi-Selecthard

A team uses Skaffold for local development and CI/CD. They want to run integration tests against the deployed application before releasing to production. Which THREE Skaffold features can they use?

Select 3 answers
A.Port forwarding to access the application locally
B.Custom test via the 'test' config section
C.Skaffold deploy with --status-check to verify rollout
D.Skaffold run for end-to-end pipeline
E.Skaffold debug for interactive debugging
AnswersB, C, D

Skaffold supports custom test commands in the 'test' phase.

561
MCQeasy

In BigQuery, a BI analyst wants to store financial data with high precision and avoid rounding errors. Which data type should be used for currency columns?

A.NUMERIC
B.FLOAT64
C.INT64
D.STRING
AnswerA

NUMERIC is a fixed-point decimal type designed for financial precision.

Why this answer

NUMERIC (also known as DECIMAL) is the correct choice because it stores exact numeric values with up to 38 digits of precision and a user-defined scale, making it ideal for financial data where rounding errors from binary floating-point representation are unacceptable. In BigQuery, NUMERIC uses fixed-point arithmetic, ensuring that calculations like tax or interest accruals remain exact to the specified decimal places.

Exam trap

Google Cloud often tests the misconception that FLOAT64 is acceptable for currency because it 'has enough precision,' but the trap is that binary floating-point types inherently cannot represent many decimal fractions exactly, causing cumulative rounding errors in financial data.

How to eliminate wrong answers

Option B is wrong because FLOAT64 is a binary floating-point type that approximates values, leading to rounding errors in financial calculations due to its base-2 representation (e.g., 0.1 cannot be represented exactly). Option C is wrong because INT64 stores only whole integers, losing the fractional cents required for currency columns. Option D is wrong because STRING stores text, not numeric values, and would require costly and error-prone conversions for any arithmetic operations.

562
MCQmedium

You are configuring a Cloud Build pipeline that builds a Docker image, pushes it to Artifact Registry, and deploys to Cloud Run. The build requires network access to a private VPC to download dependencies. Which approach should you use to provide VPC access?

A.Add the VPC firewall rule to allow traffic from Cloud Build's default IP range.
B.Use the default Cloud Build pool and configure VPC peering in the build steps.
C.Create a Cloud Build private pool connected to the VPC, and run the build using that pool.
D.Use Cloud NAT to allow egress from the default pool to the VPC.
AnswerC

Private pools provide direct VPC connectivity.

Why this answer

Option C is correct because Cloud Build private pools provide direct VPC connectivity by running worker VMs inside a customer-managed subnet within the specified VPC. This allows the build to access private resources (e.g., dependency mirrors, internal repositories) without traversing the public internet, meeting the requirement for network access to a private VPC.

Exam trap

Cisco often tests the distinction between default and private pools, trapping candidates who assume that firewall rules or NAT can bridge the network isolation of the default pool, when in fact only a private pool provides the necessary VPC integration.

How to eliminate wrong answers

Option A is wrong because Cloud Build's default pool uses ephemeral IPs from a Google-managed range that cannot be predicted or added to VPC firewall rules; moreover, VPC firewall rules control traffic to/from VM instances, not outbound access from Cloud Build workers. Option B is wrong because the default Cloud Build pool does not support VPC peering configuration in build steps; VPC peering is a network-level setup between VPCs, not a per-build configuration. Option D is wrong because Cloud NAT enables outbound internet access from private VMs, but the default Cloud Build pool's workers are not in your VPC, so Cloud NAT cannot provide egress from them to your private VPC.

563
Multi-Selecteasy

A company is planning to migrate their on-premises Oracle database to Cloud SQL. Which THREE prerequisites must be satisfied?

Select 3 answers
A.Convert Oracle-specific syntax to PostgreSQL or MySQL
B.Purchase Cloud SQL Enterprise Plus edition for the target instance
C.Ensure the source database is compatible with Database Migration Service (DMS)
D.Set up VPC peering or VPN to connect on-premises to Google Cloud
E.Create a Cloud Storage bucket for staging migration data
AnswersA, C, D

Database Migration Service handles schema conversion, but manual tuning may be needed.

Why this answer

Option A is correct because Cloud SQL does not support Oracle's proprietary PL/SQL syntax. When migrating from Oracle to Cloud SQL, you must convert Oracle-specific syntax (e.g., sequences, packages, hierarchical queries) to the target dialect—either PostgreSQL or MySQL—since Cloud SQL offers only these two engines. This conversion is a prerequisite to ensure the migrated database functions correctly after the move.

Exam trap

Google Cloud often tests the misconception that Cloud SQL supports Oracle as a native engine, leading candidates to overlook the mandatory syntax conversion, or that a staging bucket is always required when DMS can perform direct migration without intermediate storage.

564
MCQeasy

A developer is designing a schema for Firestore to store user profiles. Each user has a unique ID and multiple addresses. Which data modeling approach is recommended for Firestore?

A.Store addresses as a string array in the user document.
B.Use a relational join between users and addresses collection.
C.Create a separate collection for addresses with a reference to user ID.
D.Store addresses as a nested map within the user document.
AnswerD

Nested maps are ideal for one-to-few relationships and minimize reads.

Why this answer

Firestore encourages denormalization for one-to-few relationships. Storing addresses as a nested map within the user document (Option A) is efficient for small, fixed sets of addresses. Option B (separate collection) is for large or dynamic lists.

Option C is not possible in Firestore. Option D (string array) loses structure.

565
Multi-Selecthard

A company is migrating a stateful web application from on-premises to Google Kubernetes Engine (GKE). The application has variable traffic patterns, with occasional spikes. The team wants to optimize performance and availability while minimizing cost during spikes. The application is not fault-tolerant to instance restarts. Which TWO strategies should the team implement? (Choose TWO)

Select 2 answers
A.Use preemptible VMs to reduce cost during spikes
B.Configure pod disruption budgets to ensure a minimum number of pods remain available during node scaling
C.Use Vertical Pod Autoscaler in Auto mode to automatically adjust pod resources without restarts
D.Configure cluster autoscaler to add nodes when utilization is high
E.Set cluster autoscaler scale-down delay to 0 for immediate cost savings
AnswersB, D

Pod disruption budgets protect against voluntary disruptions (e.g., node scaling), ensuring availability during spikes.

Why this answer

Cluster autoscaler adds nodes during spikes, but to avoid disruption from node scaling activities, pod disruption budgets should be configured to protect critical pods. Preemptible VMs are not suitable because the application is not fault-tolerant to restarts. VPA with Auto mode can adjust resource requests without restarting pods, but may take time to react to spikes; HPA is better for handling spikes quickly.

566
MCQeasy

An SLA guarantees 99.9% monthly uptime. The team's SLO is 99.95% and error budget is 0.05%. What is the maximum allowed downtime per month according to the SLA?

A.7.2 hours.
B.43.8 minutes.
C.21.9 minutes.
D.4.38 hours.
AnswerB

0.1% of 43,800 minutes = 43.8 minutes, which is the SLA allowance.

Why this answer

99.9% uptime allows 0.1% downtime. Per month (30 days = 43,800 minutes), 0.1% is 43.8 minutes. The SLO is stricter but the question asks for SLA allowance.

567
MCQeasy

A team is migrating an on-premises MySQL database to Cloud SQL. The current schema usesMyISAM tables. What is the recommended approach?

A.Keep the schema as is; Cloud SQL supports MyISAM.
B.Convert MyISAM tables to InnoDB before migration.
C.Replicate the on-premises MySQL to Cloud SQL using Database Migration Service.
D.Export the database using mysqldump and import directly into Cloud SQL.
AnswerB

InnoDB is the default and recommended engine; conversion ensures compatibility and transactional support.

Why this answer

Cloud SQL for MySQL does not support MyISAM tables because MyISAM lacks transaction support, row-level locking, and crash recovery, which are essential for a managed database service. Converting MyISAM tables to InnoDB before migration ensures compatibility, data integrity, and performance. The recommended approach is to alter the table engine to InnoDB prior to export or use a migration tool that handles the conversion.

Exam trap

The trap here is that candidates assume Cloud SQL supports all MySQL storage engines, but it explicitly restricts to InnoDB and NDB, making MyISAM incompatible without prior conversion.

How to eliminate wrong answers

Option A is wrong because Cloud SQL does not support MyISAM; it only supports InnoDB and NDB Cluster (for high availability). Option C is wrong because Database Migration Service (DMS) can replicate data but does not automatically convert MyISAM tables to InnoDB; the schema must be compatible beforehand. Option D is wrong because a direct mysqldump import of MyISAM tables into Cloud SQL will fail or produce errors since Cloud SQL rejects unsupported storage engines.

568
Multi-Selectmedium

A company is designing a landing zone in Google Cloud. They need to set up a shared VPC for multiple projects. Which TWO steps should they take? (Choose two.)

Select 2 answers
A.Create a VPC network in each service project and peer them with the host project.
B.Attach service projects to the host project using the Shared VPC admin.
C.Configure VPC peering between the host project and each service project.
D.Grant the compute.networkUser role on the host project to users who need to create resources in the shared VPC.
E.Create a host project and enable the Shared VPC API.
AnswersB, E

Service projects are attached to use the host project's VPC.

Why this answer

Option B is correct because attaching service projects to a host project is the fundamental step in setting up a Shared VPC. This allows the service projects to consume resources (like VMs and GKE clusters) from the shared VPC network in the host project, enabling centralized network management and isolation.

Exam trap

The trap here is confusing VPC peering with Shared VPC, as both involve multiple projects, but Shared VPC uses a host/service project model with centralized network ownership, while peering connects independent networks.

569
MCQeasy

You are monitoring a Cloud SQL for PostgreSQL instance and notice that the CPU utilization is consistently above 90% during peak hours. What is the most cost-effective initial action to reduce CPU load?

A.Remove unnecessary indexes to reduce write overhead
B.Reduce the max_connections parameter to limit concurrent users
C.Add a read replica to offload read traffic
D.Increase the machine type (e.g., go to a higher vCPU count)
AnswerC

Read replicas handle read-only queries, reducing primary CPU load.

Why this answer

Adding a read replica is the most cost-effective initial action because it offloads read queries from the primary instance, reducing CPU contention without incurring the cost of upgrading the entire instance. Cloud SQL for PostgreSQL replicas use native streaming replication, so they handle read traffic while the primary focuses on writes, directly addressing high CPU utilization from read-heavy workloads.

Exam trap

Google Cloud often tests the misconception that vertical scaling (increasing machine type) is the default fix for high CPU, but the trap here is that adding a read replica is more cost-effective for read-heavy workloads, as it scales horizontally without upgrading the primary instance.

How to eliminate wrong answers

Option A is wrong because removing indexes typically reduces write overhead but does not significantly lower CPU utilization from read-heavy workloads; indexes often speed up reads, and removing them could increase CPU usage due to full table scans. Option B is wrong because reducing max_connections limits concurrent users but does not address the root cause of high CPU from read queries; it may cause application errors without reducing CPU load if queries are already queued. Option D is wrong because increasing the machine type (higher vCPU count) is a vertical scaling approach that is more expensive than adding a read replica and does not leverage the cost efficiency of distributing read traffic across multiple instances.

570
MCQmedium

A data engineering team ingests JSON logs into BigQuery using a streaming pipeline. Queries need to extract specific fields from nested arrays. Which SQL construct should be used to efficiently transform the nested data into a flat table for BI?

A.ARRAY_AGG with STRUCT
B.STRUCT with nested field access
C.SELECT * EXCEPT with UNNEST
D.UNNEST with CROSS JOIN
AnswerD

UNNEST flattens arrays into rows, allowing access to nested fields.

Why this answer

Option D is correct because `UNNEST` with `CROSS JOIN` is the standard SQL construct in BigQuery to flatten nested arrays (repeated fields) into a flat table. When JSON logs contain arrays of structs, `CROSS JOIN UNNEST(array_column)` expands each array element into its own row, allowing BI tools to access individual fields directly. This is the most efficient and idiomatic way to transform nested data into a relational format for querying.

Exam trap

Google Cloud often tests the confusion between aggregation (`ARRAY_AGG`) and unnesting (`UNNEST`), where candidates mistakenly think `ARRAY_AGG` can flatten data because it deals with arrays, but it actually does the reverse operation.

How to eliminate wrong answers

Option A is wrong because `ARRAY_AGG` with `STRUCT` does the opposite—it aggregates rows into nested arrays, not flattens them. Option B is wrong because `STRUCT` with nested field access only retrieves scalar values from a single struct, not from array elements, and cannot unnest multiple rows. Option C is wrong because `SELECT * EXCEPT` is used to exclude columns from a SELECT *, not to flatten arrays; it does not involve `UNNEST` in a meaningful way for array expansion.

571
MCQhard

You are configuring a dashboard-as-code using the Cloud Monitoring API. You want to create a dashboard that shows a heatmap of request latency distribution across all services. Which chart type and aggregation should you use?

A.Heatmap chart using a distribution metric
B.Stacked bar chart with mean aggregation
C.Line chart with 95th percentile aggregation
D.Scorecard chart with MAX aggregation
AnswerA

Correct. Heatmaps visualize the distribution of values across buckets over time.

Why this answer

Heatmaps in Cloud Monitoring are created using a 'heatmap' chart type, which displays the distribution of metric values over time. This requires a distribution metric (e.g., from OpenTelemetry or custom) that records a histogram. The heatmap visualizes percentiles or count per bucket over time.

Line, stacked bar, and scorecard cannot show distribution.

572
MCQmedium

A company is migrating an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB and must have minimal downtime during migration. Which migration strategy should the Database Engineer recommend?

A.Export the database using pg_dump and import into Cloud SQL using pg_restore during a maintenance window.
B.Set up PostgreSQL on Compute Engine and replicate data, then switch over to Cloud SQL.
C.Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
D.Use Cloud SQL's built-in replication feature to connect directly to the on-premises database.
AnswerC

Database Migration Service supports minimal-downtime migrations using continuous replication.

Why this answer

Option C is correct because the Database Migration Service (DMS) supports continuous replication from an on-premises PostgreSQL database to Cloud SQL using logical replication (pglogical or native PostgreSQL logical replication). This allows the source database to remain operational during the migration, and the cutover to Cloud SQL can be performed with minimal downtime, typically seconds to minutes, meeting the 2 TB size and low-downtime requirements.

Exam trap

Google Cloud often tests the distinction between tools that require downtime (like pg_dump/pg_restore) and services that support continuous replication (like DMS), and the trap here is that candidates may assume Cloud SQL's built-in replication can connect to any external database, when in fact it is limited to inter-instance replication within Google Cloud.

How to eliminate wrong answers

Option A is wrong because using pg_dump and pg_restore for a 2 TB database would require a long maintenance window (potentially hours or days) to export, transfer, and import the data, which contradicts the minimal downtime requirement. Option B is wrong because setting up PostgreSQL on Compute Engine and replicating data adds an unnecessary intermediate step and does not directly migrate to Cloud SQL; it also introduces additional operational overhead and potential latency without leveraging Cloud SQL's managed service benefits. Option D is wrong because Cloud SQL's built-in replication feature (e.g., cross-region replication or read replicas) cannot connect directly to an on-premises database; it is designed for replication between Cloud SQL instances, not for external sources.

573
MCQeasy

You want to automatically group and track similar errors in your application logs, and see trends over time. Which Google Cloud service should you use?

A.Error Reporting
B.Cloud Monitoring
C.Cloud Logging
D.Cloud Trace
AnswerA

Error Reporting automatically groups similar exceptions and tracks trends.

Why this answer

Error Reporting automatically groups exceptions by similarity, provides trend analysis, and links to logs and traces. Cloud Monitoring is for metrics, Cloud Logging for logs, and Cloud Trace for tracing.

574
MCQeasy

The exhibit shows IAM policy for a BigQuery dataset. The BI team reports they can query tables but cannot create views. What is the missing role?

A.roles/bigquery.admin
B.roles/bigquery.metadataViewer
C.roles/bigquery.dataEditor
D.roles/bigquery.user
AnswerC

DataEditor includes permissions to create tables and views.

Why this answer

The BI team can query tables but cannot create views, which requires write access to the dataset. The `roles/bigquery.dataEditor` role grants permissions to read, create, update, and delete datasets, tables, and views, including the `bigquery.tables.create` and `bigquery.tables.update` permissions necessary for view creation. The existing query capability indicates they have at least `roles/bigquery.dataViewer`, but view creation demands the additional write permissions provided by `dataEditor`.

Exam trap

The trap here is that candidates confuse the ability to query tables (which only requires `dataViewer` or `user`) with the write permissions needed to create views, leading them to incorrectly select `roles/bigquery.user` or `roles/bigquery.metadataViewer`.

How to eliminate wrong answers

Option A is wrong because `roles/bigquery.admin` grants full control over BigQuery resources, including dataset deletion and IAM policy management, which is excessive and not the minimal missing role for view creation. Option B is wrong because `roles/bigquery.metadataViewer` only allows viewing dataset and table metadata (e.g., table names, schemas) but does not include the `bigquery.tables.create` permission needed to create views. Option D is wrong because `roles/bigquery.user` enables running queries and listing datasets but does not grant write permissions such as `bigquery.tables.create` or `bigquery.tables.update`, which are required for creating views.

575
MCQmedium

You are a database engineer for an e-commerce platform running on Cloud SQL for PostgreSQL. The application team reports that a critical report query taking 5 seconds last week now takes over 30 seconds. The database CPU usage has increased from 40% to 85%. The query plan shows a sequential scan on the orders table. Which action should you take first to diagnose the problem?

A.Migrate the database to Cloud Spanner for better scaling.
B.Add a composite index on the orders table based on the query's WHERE clause.
C.Increase the machine type to add more vCPUs.
D.Enable pg_stat_statements and check the query's execution statistics.
AnswerD

Provides necessary metrics to diagnose the query performance degradation.

Why this answer

Option D is correct because enabling pg_stat_statements provides detailed execution statistics (e.g., total time, calls, rows, I/O) for each query, allowing you to identify the root cause of the performance regression without making speculative changes. Since the query plan shows a sequential scan and CPU is high, pg_stat_statements can reveal if the query is now reading more rows due to data growth or plan changes, guiding the next action (e.g., adding an index or tuning parameters).

Exam trap

Google Cloud often tests the principle of 'diagnose before you treat' — the trap here is that candidates jump to adding an index (Option B) or scaling resources (Option C) without first gathering evidence, which is a common mistake in performance troubleshooting.

How to eliminate wrong answers

Option A is wrong because migrating to Cloud Spanner is a drastic architectural change that does not diagnose the problem; it introduces new complexity and cost without addressing the immediate cause (e.g., missing index or stale statistics). Option B is wrong because adding a composite index is a potential solution, not a diagnostic step; you must first confirm the query's WHERE clause and execution pattern via pg_stat_statements to avoid creating an ineffective index. Option C is wrong because increasing vCPUs treats the symptom (high CPU) rather than the cause (sequential scan); it may temporarily reduce CPU but does not fix the underlying query performance issue and could be wasteful.

576
MCQmedium

A DevOps engineer is building a CI/CD pipeline and needs to securely pass a database password to a Cloud Build step. The password is stored in Secret Manager. What is the correct way to access it in cloudbuild.yaml?

A.Use 'gcloud secrets versions access' directly in a step's entrypoint
B.Store the password in a Cloud Storage bucket and download it during build
C.Pass the password as a build substitution variable
D.Define the secret in 'availableSecrets' and reference it via 'secretEnv' in the step
AnswerD

This is the standard method: declare the secret in availableSecrets and use secretEnv to inject it as an environment variable.

Why this answer

Cloud Build can access secrets from Secret Manager using the 'availableSecrets' and 'secretEnv' configuration. The secret is then injected as an environment variable in the build step.

577
MCQeasy

A Cloud SQL for PostgreSQL instance is used for an OLTP application. The database schema has many foreign key constraints. Which action improves write performance?

A.Create indexes on foreign key columns.
B.Drop all foreign key constraints.
C.Add more triggers to enforce integrity.
D.Increase the instance storage size.
AnswerA

Indexes on foreign key columns speed up lookups during INSERT/UPDATE/DELETE operations.

Why this answer

Option A is correct because creating indexes on foreign key columns avoids full table scans during referential integrity checks. Option B is wrong as more triggers slow writes. Option C is wrong because dropping constraints risks data integrity.

Option D is wrong because increasing disk size does not directly address the performance bottleneck.

578
MCQmedium

A team has an SLO of 99.9% availability over a 30-day period. How many minutes of downtime does the error budget allow per month?

A.4.32 minutes
B.43 minutes
C.432 minutes
D.4,320 minutes
AnswerB

Correct calculation: 43,200 * 0.001 = 43.2 minutes, approximately 43 minutes.

Why this answer

Error budget = 100% - SLO target = 0.1% of total time. 30 days = 43,200 minutes. 0.1% of 43,200 = 43.2 minutes. Rounding gives 43 minutes.

579
Matchingmedium

Match each Google Cloud database service to its primary use case.

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

Concepts
Matches

Relational databases (MySQL, PostgreSQL, SQL Server)

Globally distributed, strongly consistent relational database

Serverless NoSQL document database for mobile/web apps

High-throughput, low-latency NoSQL for large analytical workloads

In-memory data store for Redis or Memcached

Why these pairings

The correct matches are Cloud SQL for standard relational workloads, Cloud Spanner for globally distributed transactions, and Bigtable for analytical workloads. Firestore is for mobile/web apps, and Memorystore is for caching. Common mistakes include confusing the use cases of these services.

580
MCQmedium

You are a database engineer at a retail company. The company uses BigQuery for BI, with a fact table 'sales_fact' partitioned by order_date and containing 100 million rows. There is a dimension table 'products' with 10,000 rows. The BI team reports that the following query takes over 5 minutes to run: SELECT p.category, SUM(s.amount) FROM sales_fact s JOIN products p ON s.product_id = p.product_id WHERE s.order_date >= '2024-01-01' AND s.order_date < '2024-04-01' GROUP BY p.category. The table 'products' is not partitioned or clustered. 'sales_fact' is partitioned by order_date but not clustered. The query only scans 3 months of data (about 25 million rows). However, the join seems slow. What is the most likely cause and what single action would you take to improve performance?

A.Cluster the 'sales_fact' table on product_id
B.Use a cross-join to avoid the join
C.Add an index on 'products.product_id'
D.Partition the 'products' table
AnswerA

Clustering on the join key reduces shuffle and speeds up join.

Why this answer

The query is slow because the join on `product_id` requires shuffling 25 million rows from `sales_fact` across nodes to match with `products`. Clustering `sales_fact` on `product_id` co-locates rows with the same `product_id` within each partition, reducing shuffle overhead and enabling more efficient broadcast or hash joins in BigQuery. This is the most impactful single action because it directly addresses the join performance bottleneck without changing the query logic.

Exam trap

Google Cloud often tests the misconception that indexes or partitioning small tables solve join performance issues, when the real solution in BigQuery is clustering the large fact table on the join key to minimize data shuffling.

How to eliminate wrong answers

Option B is wrong because a cross-join would produce a Cartesian product of 25 million × 10,000 rows, which is computationally prohibitive and would make the query far slower, not faster. Option C is wrong because BigQuery does not support traditional indexes; it uses columnar storage and clustering for data organization, so adding an index is not a valid action. Option D is wrong because partitioning the `products` table (only 10,000 rows) provides no benefit for a small dimension table; the bottleneck is the large fact table join, not the products table scan.

581
MCQmedium

Which SQL function in BigQuery is best for replacing NULL values in a numeric column with a default value?

A.NULLIF
B.NVL
C.IFNULL
D.COALESCE
AnswerD

COALESCE is standard, flexible, and preferred for portability. It can handle multiple columns.

Why this answer

Option D, COALESCE, is correct because it returns the first non-NULL value from a list of expressions, making it ideal for replacing NULLs in a numeric column with a default value. In BigQuery, COALESCE is the standard, flexible function that can handle multiple arguments, unlike IFNULL which only accepts two. This aligns with SQL ANSI standards and is the recommended approach for NULL handling in numeric columns.

Exam trap

Google Cloud often tests the distinction between IFNULL and COALESCE, trapping candidates who think IFNULL is always the best choice because it's simpler, when COALESCE is more versatile and ANSI-compliant for multiple fallback values.

How to eliminate wrong answers

Option A is wrong because NULLIF returns NULL if two expressions are equal, not a default value for NULLs; it's used for conditional NULL creation, not replacement. Option B is wrong because NVL is not a valid function in BigQuery; it exists in Oracle and other databases but BigQuery does not support it, making it a distractor for candidates familiar with other SQL dialects. Option C is wrong because IFNULL, while valid in BigQuery and capable of replacing a single NULL with a default, is less flexible than COALESCE as it only accepts two arguments; the question asks for the 'best' function, and COALESCE is preferred for its ability to handle multiple fallback values and its ANSI compliance.

582
Multi-Selectmedium

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

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

Toil is manual and repetitive.

Why this answer

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

583
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

584
Drag & Dropmedium

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

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

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

Why this order

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

585
MCQeasy

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

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

This command promotes a release to the next target.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

586
MCQhard

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

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

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

Why this answer

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

Exam trap

Cisco often tests the misconception that any unique identifier is a good partition key, but the trap here is that monotonically increasing values cause hotspotting, not just any high-frequency query pattern.

How to eliminate wrong answers

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

587
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

588
MCQeasy

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

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

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

Why this answer

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

589
MCQhard

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

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

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

Why this answer

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

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

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

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

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

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

590
MCQmedium

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

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

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

Why this answer

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

591
MCQmedium

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

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

This is the key benefit: GitOps for GCP resources.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

592
MCQhard

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

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

DMS supports continuous migration with minimal downtime.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

593
MCQhard

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

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

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

Why this answer

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

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

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

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

594
MCQeasy

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

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

Correct description of toil.

Why this answer

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

595
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

596
MCQhard

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

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

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

Why this answer

Option B is correct: Increasing the instance memory directly addresses the memory shortage. Option A (reducing shared_buffers) may free memory but hurt performance. Option C (using connection pooling) reduces memory per connection but not overall memory needs.

Option D (enabling compression) might help with I/O but not memory very much; also, pgzstd is a tricky flag.

597
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

598
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

599
MCQeasy

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

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

Simple and efficient aggregation.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

600
MCQmedium

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

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

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

Why this answer

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

Page 7

Page 8 of 14

Page 9
Google Professional Cloud Database Engineer PCDE Questions 526–600 | Page 8/14 | Courseiva