Which Google Cloud database for on-prem PostgreSQL with analytics?
Short answer
B Migrate your workloads to AlloyDB for PostgreSQL.
Question
Key Takeaways
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.
Common mistake: 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.
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
These links open the official vendor documentation in a new tab.
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.
Community Votes
50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 19 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 19
-
8ad5266 👍 5 Answered DMinimize cost. https://cloud.google.com/alloydb?hl=en AlloyDB offers superior performance, 4x faster than standard PostgreSQL for transactional workloads. That does not come without cost.
-
omkarr24 👍 4 Answered DThey currently have transactional data stored on-premises in a PostgreSQL database and they want to modernize their database that supports transactional workloads and analytics .If they select cloud Sql (postgreSQL) it will minimize the cost and complexity. and for analytics purpose they can create federated queries over cloudSql(postgreSql) https://cloud.google.com/bigquery/docs/federated-queries-intro This approach will minimze the cost
-
JyoGCP 👍 4 Answered DConsidering the cost factor, I'll go with D. If "minimize cost" is not present in the question, then I'd go with 'B' AlloyDB. Cloud SQL for PostgreSQL: Generally less expensive than AlloyDB. AlloyDB: Can be significantly more expensive due to its advanced features and high performance capabilities.
-
valbru 👍 4 Answered BAlloyDB for PostgreSQL is a fully managed, PostgreSQL-compatible database service that's designed for your most demanding workloads, including hybrid transactional and analytical processing. ref: https://cloud.google.com/alloydb/docs/overview
-
Antmal 👍 4 Answered BBecause AlloyDB is optimised for hybrid transactional and analytical processing (HTAP), meaning you can run both transactional workloads and analytics on the same database with excellent performance.
Show 14 more comments
-
datapassionate 👍 4 Answered Dhttps://cloud.google.com/alloydb#all-features The requirement is to minimize cost and complexity. Cloud SQL would be the best choice.
-
raaad 👍 4 Answered B- AlloyDB is a fully managed, PostgreSQL-compatible database service with industry-leading performance.
-
baimus 👍 3 Answered BIn real life clearly how performant it needed to be would be a massive factor. AlloyDB is more expensive (see https://cloud.google.com/alloydb/pricing, vs https://cloud.google.com/sql/pricing), but when they say "minimise cost" is that per query, or is it per year assuming similar instance size. There's no way for us to know, we have to guess. I'm guessing AlloyDB, as the question seem to be telegraphing that, but it could just as easily be CloudSQL postgres based on the cheaper costs. We simply cannot know.
-
extraego 👍 3 Answered DAlloyDB is for large scale and more expensive. We want to minimize cost and complexity, so the answer is D.
-
finixd 👍 2 Answered BIt's a little complicated, considering it says minimize costs (Cloud SQL) and run transactional workloads and support analytics needs (AlloyDB). I consider B. because you can minimize costs in the long-term instead of doing it immediately with possible extra costs in the long-term. Think about it
-
joelcaro 👍 2 Answered BB AlloyDB es la mejor opción para modernizar el entorno, mantener compatibilidad con PostgreSQL y manejar tanto cargas transaccionales como analíticas en un único sistema, minimizando costos y complejidad.
-
Vaisnavi 👍 2 Answered DDatabase Migration Service makes it easier for you to migrate your data to Google Cloud. This service helps you lift and shift your PostgreSQL workloads into Cloud SQL.
-
virat_kohli 👍 2 Answered BB. Migrate your workloads to AlloyDB for PostgreSQL.
-
juliorevk 👍 1 Answered DCloud SQL natively supports PostgreSQL AlloyDB for PostgreSQL is a great option if you're specifically looking for high performance in both transactional and analytical workloads. However, it might be more complex and costly than Cloud SQL
-
Izzyt99 👍 1 Answered BB - minimize cost Cloud SQL for PostgreSQL: Generally less expensive than AlloyDB, especially for smaller deployments. AlloyDB: Can be significantly more expensive due to its advanced features and high performance capabilities.
-
mednoun 👍 1 Answered BThe question specifies that the analytical needs need to reside in a single database. This can't be done using Cloud SQL. The database that supports all of that is AlloyDB that's why I will go with the B answer.
-
plum21 👍 1 Answered B"support analytics needs" -> columnar storage -> AlloyDB
-
MaxNRG 👍 4 Answered Dminimize cost and complexity
-
Anudeep58 👍 2 Answered BAlloyDB
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.