Compare / Spanner vs Cloud SQL

Spanner vs Cloud SQL

Both are relational and speak SQL. Cloud SQL is managed MySQL, PostgreSQL or SQL Server for conventional workloads. Spanner is a horizontally scalable relational database with strong consistency, including across regions.

In 69 practice questions across 7 practice banks

Professional Cloud Database Engineer High Availability & DR

You are migrating your company’s critical ecommerce platform from an on-premises PostgreSQL database (utilizing PostgreSQL stored procedures) to a highly available solution on Google Cloud. The platform requires an extremely low downtime (Recovery Time Objective (RTO) – 5 minutes) and minimal data loss (Recovery Point Objective – 30 seconds). The platform serves a global customer base with peak traffic distributed across multiple continents, though the primary transactional data resides in a single geographic region for regulatory compliance. You need to design a cloud database solution that meets the RTO/RPO requirements while optimizing for global read access and local transactional integrity. What should you do?

  1. 'Single-instance multi-region Spanner' is a contradiction, and moving off PostgreSQL breaks the stored-procedures constraint.

  2. HA AlloyDB in-region + cross-region replicas meets RTO/RPO and global-read/local-write needs.

  3. A same-zone replica gives no regional resilience.

  4. 'Multi-regional Cloud SQL' deployment doesn't exist; Cloud SQL is regional with manual cross-region failover.

Pick an answer to see why each option is right or wrong.

Try 20 questions free

At a glance

SpannerCloud SQL
EnginesSpanner (GoogleSQL or PostgreSQL interface)MySQL, PostgreSQL, SQL Server
ScaleHorizontal: add compute capacity, very large datasetsVertical: larger machines, read replicas
ConsistencyStrong, externally consistent, multi-regionStrong within the primary; replicas can lag
AvailabilityRegional or multi-region configurationsRegional high availability with a standby
Typical useGlobal apps, financial ledgers, inventory at scaleLine-of-business apps, CMS, lift-and-shift of existing databases

Choose Spanner when

  • The app needs relational transactions across regions with strong consistency.
  • Data or write volume outgrows a single database server.
  • The question requires very high availability for a global user base.

Choose Cloud SQL when

  • You are moving an existing MySQL, PostgreSQL or SQL Server database with minimal change.
  • The workload is regional and moderate in size.
  • You need engine-specific features or extensions.

Exam tip

"Global", "horizontally scalable" and "strongly consistent transactions" together mean Spanner. The word SQL alone does not mean Cloud SQL.

Practice banks covering this comparison

Counts match names or aliases from both sides of the comparison in question text or answer options, including incorrect options. They do not measure how often a decision appears on the official exam.