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?

  1. Migrate and modernize your database with Cloud Spanner.
  2. Migrate your workloads to AlloyDB for PostgreSQL. Source Reference Answer
  3. Migrate to BigQuery to optimize analytics.
  4. Migrate your PostgreSQL database to Cloud SQL for PostgreSQL.

Community Votes

B
50%
D
50%

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)

8ad5266 👍 5 Selected: D
Minimize 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.
mednoun 👍 1 Selected: B
The 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 Selected: B
"support analytics needs" -> columnar storage -> AlloyDB
juliorevk 👍 1 Selected: D
Cloud 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
joelcaro 👍 2 Selected: B
B 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.
baimus 👍 3 Selected: B
In 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.
Antmal 👍 4 Selected: B
Because 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.
Anudeep58 👍 2 Selected: B
AlloyDB
finixd 👍 2 Selected: B
It'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
extraego 👍 3 Selected: D
AlloyDB is for large scale and more expensive. We want to minimize cost and complexity, so the answer is D.
virat_kohli 👍 2 Selected: B
B. Migrate your workloads to AlloyDB for PostgreSQL.
omkarr24 👍 4 Selected: D
They 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
Izzyt99 👍 1 Selected: B
B - 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.
MaxNRG 👍 4 Selected: D
minimize cost and complexity
JyoGCP 👍 4 Selected: D
Considering 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 Selected: B
AlloyDB 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
datapassionate 👍 4 Selected: D
https://cloud.google.com/alloydb#all-features The requirement is to minimize cost and complexity. Cloud SQL would be the best choice.
Vaisnavi 👍 2 Selected: D
Database 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.
raaad 👍 4 Selected: B
  • AlloyDB is a fully managed, PostgreSQL-compatible database service with industry-leading performance.
scaenruy 👍 1 Selected: B
B. Migrate your workloads to AlloyDB for PostgreSQL.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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.

Related Analysis

← Back to PDE Study Guide