Professional Cloud Database Engineer Free Practice Questions
This is the free Google Professional Cloud Database Engineer practice question bank —
90 of 168 total questions, each with a full explanation, free to
read with no signup required. Updated 2026-08-06.
Every answer is verified against official Google documentation —
see our methodology.
Question 1
Your e-learning platform runs on a Cloud SQL for PostgreSQL instance (16 VCPUs, 60 GB memory and 1TB SSD) serving users in North America. Your analytics team runs complex reporting queries that often consume 80% of CPU resources, causing slow response times for student transactions during peak hours. Current workload includes 8,000 transactions per second with 60% reads and 40% writes. The reporting queries involve JOIN operations across multiple large tables with millions of rows requiring highly efficient analytical processing. The platform also experiences sudden spikes in analytical reporting demand, requiring an elastic scaling of read capacity. You need to improve the query performance for your analytics team to run their reports efficiently without impacting transactional users. You also need to plan for future traffic growth. What should you do?
A. Upgrade to Cloud SAL for PostgreSQL Enterprise Edition and route transaction and analytical queries to the primary instance.
B. Migrate to AlloyDB for PostgreSQL and upgrade the machine type of the primary instance to 32 vCPU. Create materialized views for common analytical queries.
C. Migrate to AlloyDB for PostgreSQL with a 16 vCPU primary instance and enable columnar engine for analytical workloads, using read pools for query isolation.
D. Upgrade the Cloud SQL for PostgreSQL instance to db-n1-highmem-32 and implement connection pooling with PgBouncer to handle increased load.
Show Answer
Correct Answer: C
Explanation: AlloyDB is designed for mixed transactional and analytical PostgreSQL workloads. Its columnar engine accelerates large JOIN-heavy analytical queries without changing applications, while read pools provide elastic read scaling and isolate reporting workloads from the primary transactional instance. This improves analytics performance without impacting OLTP users and supports future growth.
Question 2
You have a regional Spanner instance with no autoscaler that is serving a production workload. You observed a surge in write activities to the database during an ongoing promotional event. You received an alert that the database is close to the storage limit. Based on the storage utilization trend, the database will run out of storage in the next few hours. You want to resolve this issue as soon as possible. What should you do?
A. Create a custom instance configuration and add a custom read-only replica to the Spanner instance.
B. Increase the compute capacity of the Spanner instance.
C. Move the Spanner instance to a multi-regional configuration.
D. Archive and delete historical data from the database.
Show Answer
Correct Answer: B
Explanation: Increase the compute capacity of the Spanner instance. In Cloud Spanner, storage capacity scales with compute capacity (nodes or processing units). If the instance is approaching its storage limit and will exhaust capacity within hours, the fastest mitigation is to add compute capacity. Creating read-only replicas does not increase storage capacity, moving to a multi-region configuration is a major migration and not an immediate fix, and archiving/deleting historical data may help eventually but is not the recommended rapid mitigation for an imminent storage limit.
Question 3
Your company is using a multi-region Spanner instance. The instance stores data from an application which does a lot of writes without reading the data. You are noticing a lot of latency regression. You want to reduce latency and improve performance. What should you do?
A. Enable leader-aware routing in the client library.
B. Add additional indexes to the table.
C. Disable leader-aware routing in the client library.
D. Increase the number of Spanner nodes.
Show Answer
Correct Answer: A
Explanation: In a multi-region Spanner instance, write transactions must be coordinated by the leader replica. Leader-aware routing directs requests to the leader region, reducing extra network hops and write latency. Adding indexes increases write work, disabling leader-aware routing can increase latency, and adding nodes primarily increases throughput rather than addressing leader-routing latency.
Question 4
You are planning the migration of a large Oracle database to AlloyDB for PostgreSQL. The database contains a large amount of application logic written as stored procedures that needs to be migrated to the target database. You want to minimize both migration effort and downtime for the migration. What should you do?
A. Use Ora2pg for schema and code conversion and data migration.
B. Use Ora2pg for schema and code conversion. Use the oracle_fdw extension in AlloyDB and replicate data from source to destination by using CREATE TABLE AS SELECT statements.
C. Use Database Migration Service. Set up a conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination.
D. Use Database Migration Service. Set up a legacy conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination.
Show Answer
Correct Answer: C
Explanation: For a large Oracle-to-AlloyDB migration with significant stored procedure logic, Database Migration Service supports schema and code conversion through a conversion workspace and performs low-downtime migration using backfill plus change data capture (CDC). This minimizes both migration effort and downtime better than manual approaches such as Ora2pg alone. A legacy conversion workspace is not the recommended current option.
Question 5
Your application uses a Cloud SQL for MySQL instance. Recently, you have noticed performance degradation during peak hours, leading to slow response times and frustrated users. You suspect that inefficient queries might be contributing to these issues. You want to pinpoint and analyze these problematic queries and pass them to the application team for optimizations. What should you do?
A. Use the underprovisioned instance recommender.
B. Increase the Cloud SQL instance read_buffer_size flag.
C. Enable and use Query Insights.
D. Create a Cloud Monitoring alert based on the database/mysql/queries metric.
Show Answer
Correct Answer: C
Explanation: Query Insights is the Cloud SQL feature designed to identify, analyze, and troubleshoot slow and inefficient SQL queries by providing query performance, execution statistics, and insights that can be shared with developers for optimization. The other options do not identify problematic queries: the underprovisioned instance recommender suggests sizing changes, increasing read_buffer_size is a tuning change rather than analysis, and a monitoring alert on query count does not reveal inefficient SQL.
Question 6
You are using Memorystore for Redis to cache frequently accessed data and improve your application’s performance. In the event of a complete regional outage, the application will failover to another region. You want to ensure that the Memorystore instance in the new region does not start from an empty cache after failover. What should you do?
A. Use Memorystore Standard Tier. Disable read replicas.
B. Use Memorystore Standard Tier. Configure at least one read replica.
C. Schedule exports of the Memorystore instance. Specify a dual-region Cloud Storage bucket as the export destination.
D. Enable Redis RDB snapshots for Memorystore.
Show Answer
Correct Answer: C
Explanation: Memorystore for Redis does not provide cross-region replication. Standard Tier and read replicas only improve availability within a region. RDB snapshots help recover an instance but are not a cross-region cache seeding mechanism. Regularly exporting data to a dual-region Cloud Storage bucket allows the cache to be restored in the failover region instead of starting empty.
Question 7
You are migrating an on-premises online transactional process (OLTP) PostgreSQL database to Google Cloud. You want to reduce the administrative overhead on database maintenance activities, such as vacuum and memory tuning. You are also planning to introduce analytic use cases in this database. You need the migration to have minimal schema and application changes. What should you do?
A. Use Spanner with PGAdapter.
B. Use Cloud SQL for PostgreSQL.
C. Use AlloyDB for PostgreSQL.
D. Deploy a self-managed PostgreSQL database on Compute Engine.
Show Answer
Correct Answer: C
Explanation: AlloyDB for PostgreSQL is the best fit because it is a fully managed PostgreSQL-compatible database that reduces administrative overhead (including automated maintenance and tuning), requires minimal schema and application changes due to PostgreSQL compatibility, and is designed to support both high-performance OLTP and analytical workloads through its columnar engine.
Question 8
Your company is migrating from an on-premises database to a single-region Spanner instance. The current database supports 40,000 reads each second, and 7,000 writes each second, at 1 KB row sizes at peak. You need to determine the most cost-effective size for the Spanner instance to handle the equivalent current workload. What should you do?
A. Select a 4-node Spanner instance.
B. Select a 6-node Spanner instance.
C. Select a 1-node Spanner instance.
D. Recommend a multi-region Spanner instance.
Show Answer
Correct Answer: A
Explanation: For single-region Cloud Spanner with approximately 1 KB rows, a common sizing guideline is about 10,000 reads/sec or 2,000 writes/sec per node. The workload requires 40,000 reads/sec (4 nodes) and 7,000 writes/sec (3.5 nodes, rounded up to 4). Capacity must satisfy both, so a 4-node single-region instance is the smallest cost-effective configuration.
Question 9
You are a DBA at a retail company. The production databases are running in Cloud SQL for MySQL Enterprise Plus edition, version 8.0.34, in the us-centrall region. You need to set up and test disaster recovery (DR) with zero data loss in the us-west1 region. What should you do?
A. Use advanced DR by setting up a cascading read replica in the us-west1 region, and designate it as the failover DR replica. Test switchover by using the gcloud switchover command.
B. Create a cross-region read replica, version 8.0.37, in the us-west1 region. Designate it as the failover DR replica, and test switchover by using the gcloud switchover command.
C. Create a cross-region read replica version 8.0.34, in the us-west1 region. Designate it as the failover DR replica, and test switchover by using the gcloud switchover command.
D. Create a cross-region read replica, version 8.0.34, in the us-west1 region. Test switchover by using the gcloud promote-replica with failover command.
Show Answer
Correct Answer: C
Explanation: Advanced Disaster Recovery for Cloud SQL Enterprise Plus requires designating a cross-region DR replica. The replica should use the same MySQL minor version as the primary (8.0.34), making 8.0.37 invalid. Zero-data-loss DR testing is performed with the switchover command, not promote-replica. A cascading replica is not the standard setup for a cross-region DR replica in this scenario.
Sources:
https://docs.cloud.google.com/sql/docs/release-notes
Question 10
You want to migrate an on-premises MySQL database to Cloud SQL. The on-premises database currently has 16 cores and 64 GB of RAM and averages 75% CPU utilization to support an application with over 100.000 tables. You need to specify the most cost-effective machine size you need when migrating to Cloud SQL for MySQL. What should you do?
A. Select a Cloud SQL for MySQL database with a machine configuration of 12 cores and 48 GB of RAM.
B. Select a Cloud SQL for MySQL database with a machine configuration of 16 cores and 64 GB of RAM.
C. Select a Cloud SQL for MySQL database with a machine configuration of 32 cores and 256 GB of RAM.
D. Select a Cloud SQL for MySQL database with a machine configuration of 64 cores and 768 GB of RAM.
Show Answer
Correct Answer: C
Explanation: Cloud SQL for MySQL has special sizing guidance for instances with very large numbers of tables. Although the current workload (16 cores, 64 GB RAM at ~75% CPU) might suggest a similar or slightly smaller machine, a database with over 100,000 tables exceeds the standard recommendation threshold. Google recommends at least 32 vCPUs and approximately 200 GB+ RAM for databases with 50,000–500,000 tables. Among the options, 32 cores and 256 GB RAM is the smallest configuration that satisfies this guidance, making it the most cost-effective compliant choice.
$19
Get all 168 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.