Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team is migrating a 450 GB PostgreSQL database from an on-premises data center to Cloud SQL for PostgreSQL during a scheduled maintenance window. To meet strict timeline and integrity goals, your migration workflow must satisfy the following requirements:
Which export, import, and validation strategy should you implement?
Running pg_dump without --jobs executes a single-threaded export, and setting -z 0 explicitly disables compression on the generated backup archive. Checking pg_restore exit codes only confirms whether SQL statements executed without fatal syntax or permission errors.
--jobs restricts extraction to one database connection, creating a severe bottleneck on a 450 GB database and risking an overrun of the scheduled maintenance window.-z 0 produces an uncompressed dump, maximizing the bytes sent across the bandwidth-constrained network instead of reducing transfer duration.0 to 9): In pg_dump, -z 0 means no compression, -z 6 is the default balance, and higher values shrink file sizes further at the expense of client CPU.You were exporting a very small database on an extremely CPU-starved client host over a high-speed local network where compression overhead outweighed transfer savings and formal source-to-target reconciliation was not required.
For a 450 GB migration, combining --jobs with an active compression level (-z 6 to -z 9) and following pg_restore with DVT ensures both fast movement and cryptographic or statistical proof of completeness.
This approach combines PostgreSQL's native parallel and compressed backup utilities (pg_dump and pg_restore) with the Google Cloud CLI (gcloud storage cp) for high-throughput object staging and the open-source Data Validation Tool (DVT) for automated post-import verification.
--jobs flag to pg_dump distributes table extraction across multiple concurrent worker threads, while gcloud storage cp automatically applies multithreading and multiprocessing to accelerate uploads to Cloud Storage.-z option (0 through 9, with 6 as the default) compresses the dump payload on the client host, substantially reducing transfer duration and storage footprint over constrained links.pg_restore and inspecting restore logs, DVT connects to both the source PostgreSQL database and the target Cloud SQL instance to run schema-level comparisons, column aggregations (COUNT, SUM, AVG, MIN, MAX), and row-level hash or exact-match checks.pg_dump and pg_restore workflows are ideal for scheduled-maintenance migrations of 500 GB or less.-z up to 9 when client CPU resources are plentiful to minimize network transfer volume.gcloud storage cp handles transient network failures and automatically resumes interrupted transfers.This strategy satisfies every performance and validation constraint using proven, built-in database utilities and Google-backed open-source tooling without unnecessary custom scripts or unsupported service modes.
Exporting tables as uncompressed CSV files extracts raw delimited text without embedded schema metadata or size reduction, while HammerDB is an open-source database benchmarking and load-testing tool built around industry-standard transactional (TPROC-C) and analytical (TPROC-H) workloads.
pg_dump archives, CSV files require table schemas to be created and maintained separately before import.You only needed to migrate a small filtered subset of tables where flat-file transformation was required and you wanted to benchmark transactional performance on the target Cloud SQL instance afterward.
Even when CSV exports are unavoidable, compressing files (for example with gcloud storage cp --gzip-local) and pairing them with DVT or COUNT(*) verification queries is necessary to satisfy speed and integrity requirements.
Database Migration Service (DMS) is a managed service for continuous Change Data Capture (CDC) database migrations into Google Cloud, while QuickPerf is a lightweight SQL-based benchmarking utility distributed with the Spanner JDBC driver to generate sample datasets and measure Spanner query performance.
pg_dump and pg_restore utilities are recommended instead of DMS.SUM, AVG, COUNT) and row-level validation across heterogeneous or external sources.You were performing a continuous, near-zero-downtime CDC migration to Cloud SQL for PostgreSQL using DMS, or benchmarking a Spanner proof-of-concept schema using QuickPerf rather than validating PostgreSQL data completeness.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated