Original study notes for cloud certification exams — Google Cloud first, more clouds in build.

Cloud Spanner Study Notes

Cloud Spanner is a fully managed, globally distributed relational database that combines SQL, strong consistency, and horizontal scaling without manual sharding. It is designed for mission-critical applications that outgrow a single-region database in scale or availability. Spanner offers regional and multi-region configurations with very high availability service level agreements.

Exam tip: Global plus relational plus strong consistency plus horizontal scale in one scenario is always Spanner; no other Google database matches all four.

Key facts

What the exam expects you to know

Cloud Spanner vs Cloud SQL: when to use which

Use Cloud Spanner when you need a relational database that scales horizontally across regions, maintains strong consistency globally, and supports very high throughput and availability for systems like global inventory, payments, or gaming leaderboards. Use Cloud SQL when the workload is regional, fits comfortably on a single primary, and benefits from native MySQL, PostgreSQL, or SQL Server compatibility at lower cost. The exam trigger words are global, unlimited scale, and strong consistency together, which point to Spanner, while standard application database needs point to Cloud SQL. See also the Cloud SQL notes.

Useful gcloud commands

gcloud spanner instances create my-instance --config=regional-us-central1 --description=MyInstance --processing-units=1000
gcloud spanner databases create my-db --instance=my-instance
gcloud spanner instances list

Common exam traps

Frequently asked questions

Why does primary key design matter so much in Spanner?

Spanner distributes data by primary key ranges into splits that can live on different servers, so a well spread key balances load across the system. Sequential keys send all new writes to the same split, creating a hotspot and limiting throughput. Using UUIDs, hashed values, or reversing timestamps distributes writes and unlocks horizontal scaling.

Is Spanner suitable for analytics queries?

Spanner is optimized for operational, transactional workloads with strong consistency, not for large analytical scans across billions of rows. For data warehousing and business intelligence, BigQuery is the intended service and can query Spanner data through external connections or exports. The exam separates OLTP in Spanner from OLAP in BigQuery very clearly.

What availability does Spanner offer?

Regional Spanner configurations offer high availability across zones, and multi-region configurations offer even higher availability, up to 99.999 percent at the time of writing, by replicating across regions. Failover is automatic and does not require promoting a read replica manually. This managed resilience is a key reason to choose Spanner for mission-critical global systems.

Study aid disclaimer: Cloud Cert Notes is an independent educational study aid. It is not affiliated with, endorsed by, or sponsored by Google, Microsoft, Amazon, Oracle, or Alibaba. Google Cloud, Associate Cloud Engineer, and Cloud Digital Leader are trademarks of Google LLC; all other certification names and product names are trademarks of their respective owners. Always confirm service details against the official provider documentation before sitting an exam.