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
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?
-
'Single-instance multi-region Spanner' is a contradiction, and moving off PostgreSQL breaks the stored-procedures constraint.
-
HA AlloyDB in-region + cross-region replicas meets RTO/RPO and global-read/local-write needs.
-
A same-zone replica gives no regional resilience.
-
'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 freeAt a glance
| Spanner | Cloud SQL | |
|---|---|---|
| Engines | Spanner (GoogleSQL or PostgreSQL interface) | MySQL, PostgreSQL, SQL Server |
| Scale | Horizontal: add compute capacity, very large datasets | Vertical: larger machines, read replicas |
| Consistency | Strong, externally consistent, multi-region | Strong within the primary; replicas can lag |
| Availability | Regional or multi-region configurations | Regional high availability with a standby |
| Typical use | Global apps, financial ledgers, inventory at scale | Line-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.
- PCDE Professional Cloud Database Engineer · 26 questions
- ACE Associate Cloud Engineer · 13 questions
- PDE Professional Data Engineer · 11 questions
- PCD Professional Cloud Developer · 7 questions
- CDL Cloud Digital Leader · 6 questions
- PCA Professional Cloud Architect · 5 questions
- ADP Associate Data Practitioner · 1 question
More comparisons
- Spanner vs Bigtable
- BigQuery vs Cloud SQL
- Firestore vs Cloud SQL
- BigQuery vs Bigtable
- Dataflow vs Dataproc
- Cloud Run vs GKE
- Cloud Composer vs Workflows
- Firestore vs Bigtable
- Cloud SQL for PostgreSQL vs AlloyDB
- Shared VPC vs VPC Network Peering
- Cloud VPN vs Cloud Interconnect
- Cloud Storage classes: Standard, Nearline, Coldline or Archive?
- Cloud Run functions vs Cloud Run services
- Cloud Armor vs VPC firewall rules
- Memorystore vs Firestore
- Looker vs Looker Studio
- Pub/Sub vs Cloud Tasks
- App Engine vs Cloud Run
- Google-managed keys vs Customer-managed keys (CMEK)
- Identity-Aware Proxy vs VPN
- Compute Engine vs GKE
- Dataproc vs BigQuery
- GKE Autopilot vs Standard: which mode to choose?
- Vertex AI vs BigQuery ML
- VPC Service Controls vs IAM
- Private Google Access vs Cloud NAT