Google

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-10-04.

Every answer is verified against official Google documentation — see our methodology.

Question 1

You are deploying a new Cloud SQL instance on Google Cloud using the Cloud SQL Auth proxy. You have identified snippets of application code that need to access the new Cloud SQL instance. The snippets reside and execute on an application server running on a Compute Engine machine. You want to follow Google-recommended practices to set up Identity and Access Management (IAM) as quickly and securely as possible. What should you do?

A. For each application code, set up a common shared user account.
B. For each application code, set up a dedicated user account.
C. For the application server, set up a service account.
D. For the application server, set up a common shared user account.
Show Answer
Correct Answer: C
Explanation:
Use a service account for the Compute Engine application server and grant it the Cloud SQL Client role (or the necessary least-privilege permissions). The Cloud SQL Auth proxy uses the server’s service account credentials to authenticate, avoiding shared user accounts or per-code user accounts.

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 2

You work in the logistics department. Your data analysis team needs daily extracts from Cloud SQL for MySQL to train a machine learning model. The model will be used to optimize next-day routes. You need to export the data in CSV format. You want to follow Google-recommended practices. What should you do?

A. Use Cloud Scheduler to trigger a Cloud Function that will run a select * from table(s) query to call the cloudsql.instances.export API.
B. Use Cloud Scheduler to trigger a Cloud Function through Pub/Sub to call the cloudsql.instances.export API.
C. Use Cloud Composer to orchestrate an export by calling the cloudsql.instances.export API.
D. Use Cloud Composer to execute a select * from table(s) query and export results.
Show Answer
Correct Answer: B
Explanation:
Use Cloud Scheduler to publish a scheduled message to Pub/Sub, which triggers a Cloud Function to call the Cloud SQL Admin API’s export method. The export request can specify CSV format and the data to export. Option A incorrectly describes running a SELECT query as the way to call the export API; Cloud Composer is unnecessary for this scheduled export.

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.

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