Which Google Cloud database for on-prem PostgreSQL with analytics?
You currently have transactional data stored on-premises in a PostgreSQL database. To modernize your data environment, you want to run transactional workloads and support analytics needs with a single database. You need to move to Google Cloud without changing database management systems, and minimize cost and complexity. What should you do?
Community Votes
50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The key is recognizing that AlloyDB is PostgreSQL-compatible and designed for hybrid transactional/analytical processing, while Cloud SQL only handles OLTP — so cost should not override the single-database analytics requirement.
For migrating an on-premises PostgreSQL database to Google Cloud while keeping PostgreSQL compatibility and supporting analytics in one database, AlloyDB for PostgreSQL is the recommended choice. Despite Cloud SQL's lower cost, AlloyDB's HTAP capabilities make it the best fit.
Choosing D (Cloud SQL for PostgreSQL) because it is cheaper; however, Cloud SQL is optimized for OLTP and lacks native analytical capabilities, so you would need to add BigQuery or another service, violating the 'single database' requirement.
Community Discussion (20 comments)
- AlloyDB is a fully managed, PostgreSQL-compatible database service with industry-leading performance.
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
AlloyDB for PostgreSQL is a fully managed, PostgreSQL-compatible service built for HTAP, meaning it can handle both transactional workloads and analytics on the same database. The question explicitly requires "a single database" for transactional and analytics needs, and AlloyDB's columnar engine and built-in analytical capabilities make it the right fit. It also avoids changing the DBMS since it is PostgreSQL-compatible, and it can reduce overall cost by eliminating the need for a separate analytics database.Why the Other Options Are Wrong
Cloud Spanner (A) is scalable and supports PostgreSQL dialect but is primarily a relational database for distributed transactions; it is not designed for analytical workloads and may require changing database models. BigQuery (C) is a data warehouse for analytics, not for transactional workloads, so it does not satisfy the "single database" requirement. Cloud SQL for PostgreSQL (D) is a managed OLTP database, but it lacks built-in analytical processing; you would need to add BigQuery or another solution, increasing complexity and not meeting the "single database" criterion.Community Comment Notes
The community is split 50/50 between B and D. Commenters favoring D (e.g., comment [4] and [9]) focus mainly on cost, noting Cloud SQL is less expensive than AlloyDB. However, commenters favoring B (e.g., comment [2] and [5]) correctly point out that AlloyDB is "optimised for hybrid transactional and analytical processing (HTAP)" and is "built for your most demanding workloads." Comment [8] even notes that if "minimize cost" is interpreted per year for the same instance size, AlloyDB could still be competitive when you avoid a separate analytics service. The decisive factor is the "single database" phrase, which strongly points to AlloyDB.Official Reference
Exam Strategy
Focus on the requirement "single database" for both transactions and analytics — AlloyDB's HTAP design is the answer. Don't let "minimize cost" trick you into Cloud SQL; Cloud SQL would require adding BigQuery for analytics, which increases complexity.