Google Cloud

Spanner Complete Guide: Global Distributed NewSQL Features, Pricing & DB Comparisons

2026-05-24
NicheeLab Editorial Team

Spanner is Google's globally distributed NewSQL database, delivering SQL, ACID transactions, strong consistency, and horizontal scale all at once. Battle-tested inside Google (AdWords, Gmail, YouTube) for years, it is one of the very few global databases that offer a 99.999% SLA.

Key Features of Spanner

  • Strong consistency + horizontal scale: effectively sidesteps the CAP theorem (built on TrueTime)
  • SQL + ACID: transactions, JOINs, and aggregate queries are all supported
  • Global distribution: multi-region configurations can span 5 continents
  • 99.999% SLA: for multi-region configurations (under 5 minutes of downtime per year)
  • Zero-downtime scaling: just add more PUs (Processing Units)
  • Two SQL dialects: GoogleSQL and the PostgreSQL Interface

TrueTime

The core technology behind Spanner. By combining GPS receivers and atomic clocks deployed across Google data centers, TrueTime represents distributed time as a bounded interval. Standard NTP has uncertainty of several to tens of milliseconds, but TrueTime keeps the uncertainty strictly bounded (typically under 7 ms). That bound is what lets Spanner provide global External Consistency (a guarantee of global ordering).

Pricing

ItemPrice (us-central1, 2026)
Processing Unit (PU)$0.90 / 100 PU / hour (Regional)
Storage$0.30 / GB / month (Regional)
Multi-region PU$3 / 100 PU / hour
Multi-region storage$0.50 / GB / month
Backup$0.10 / GB / month
Network egressStandard egress rates

You can start at the 100 PU minimum (formerly 0.1 node). 1000 PU is equivalent to 1 node, which translates to roughly 10,000 QPS as a throughput guideline.

Configuration Patterns

ConfigurationUse caseSLA
RegionalRegional apps99.99%
Dual-regionTwo-region HA99.999%
Multi-region (3+)Global deployment99.999%

The Two SQL Dialects

  • GoogleSQL (formerly ZetaSQL): the same dialect as BigQuery. Strong support for arrays, STRUCTs, and window functions
  • PostgreSQL Interface: PostgreSQL wire-compatible, so existing OSS tooling (psql, pg_dump, SQLAlchemy) works out of the box

Spanner Graph (2024+)

  • Run Property Graph queries directly on Spanner
  • ISO GQL standard with openCypher compatibility
  • Used for knowledge graphs, fraud detection, social networks, and recommendation systems
  • Coexists with existing relational data in the same database

Comparison with Other NewSQL Databases

ItemSpannerAWS Aurora DSQLCockroachDBAzure Cosmos DB
ConsistencyExternal ConsistencySerializableSerializable5 selectable levels
SQLGoogleSQL / PostgreSQLPostgreSQLPostgreSQLNoSQL-centric + SQL API
SLA99.999%99.99%Self-managed99.999%
PricingPU hoursPay-as-you-goVM hoursRU hours
Track record10+ years inside GoogleGA in 2024OSS / commercialNumerous

Typical Use Cases

  • Player data for global games
  • Financial transactions (low latency + strong consistency + compliance)
  • E-commerce order management
  • Multi-tenant SaaS (tenant isolation + global rollout)
  • Ad serving (real-time bidding + global reach)
  • Knowledge graphs (via Spanner Graph)

Best Practices

  • Primary key design: avoid hotspots (don't use sequential numbers or timestamps; prefer UUIDs or hashes)
  • Interleaved Table: physically co-locate parent-child rows to speed up JOINs
  • Mutation limit: 80,000 mutations per transaction is the hard cap
  • Query optimization: use Query Insights to detect slow queries
  • Backup: automatic backups plus Point-in-time Recovery (PITR window of 1 hour to 7 days)
  • Multi-region: serve reads from the local region; writes are funneled to the leader

Should I choose Spanner or Cloud SQL?

Choose Spanner if you need global distribution, horizontal scaling, and a 99.999% SLA. Choose Cloud SQL for region-bound workloads or when you want to keep using MySQL, PostgreSQL, or SQL Server. Spanner is pricier, so the right pick depends on your requirements.

What is the difference between Spanner and Bigtable?

Spanner is a NewSQL database (SQL + ACID transactions + strong consistency). Bigtable is a NoSQL wide-column store (high-throughput time-series workloads). The standard practice is to keep them strictly separated by use case.

What is TrueTime?

A distributed time API backed by GPS receivers and atomic clocks in Google data centers. It is the foundational technology that lets Spanner provide global ordering (External Consistency).

How is Spanner priced?

You pay for compute by the hour (node/PU time), plus storage and network. The minimum is 100 PU (Processing Units, formerly 0.1 node). Global multi-region configurations are notably more expensive.

What is Spanner Graph?

A 2024 feature that lets you run Property Graph queries (Cypher compatible) directly on Spanner. Common use cases include knowledge graphs, fraud detection, and social networks.

How does the PostgreSQL Interface differ from GoogleSQL?

Spanner's PostgreSQL Interface supports the PostgreSQL wire protocol and a syntax subset, making it easy to migrate existing PostgreSQL apps. You pick one of two dialects: PostgreSQL Interface or GoogleSQL (formerly ZetaSQL).

How does Spanner compare to other cloud NewSQL databases?

AWS Aurora DSQL (GA in 2024) is Spanner-like, Azure Cosmos DB is NoSQL-centric, and CockroachDB is an OSS Spanner clone. For sustaining a 99.999% SLA, Spanner has by far the longest track record.

Is there a free trial for learning Spanner?

You can experiment with the 90-day Free Trial and $300 in credits. At the 100 PU minimum, you can start for just a few thousand yen (a few tens of dollars) per month.

Related Articles: Databases

GCP Professional Cloud Developer (PCD) 完全ガイド|Cloud Run・GKE・CI/CD・APM

Google Cloud Professional Cloud Developer の試験範囲、Cloud Run / GKE / Cloud Build / Cloud Trace、AWS DVA / Azure AZ-204 比較、学習ロードマップを徹底解説。

GCP Professional Cloud Database Engineer (PCDBE) 完全ガイド|Spanner・AlloyDB・Cloud SQL

Google Cloud Professional Cloud Database Engineer の試験範囲、Spanner / AlloyDB / Cloud SQL / Bigtable / Firestore、AWS DBS・Azure DP-300 比較を詳解。

Cloud Storage 完全ガイド|料金・Storage Class・Lifecycle・AWS S3 比較 (GCP)

Google Cloud Storage の全機能解説。Storage Class (Standard/Nearline/Coldline/Archive)、Multi-region、Object Lifecycle、Versioning、Signed URL、Uniform IAM、AWS S3 / Azure Blob 比較を網羅。

Cloud Functions (2nd gen) 完全ガイド|1st gen 違い・料金・Lambda 比較 (GCP)

Google Cloud Functions 2nd gen の全機能解説。1st gen 違い、Eventarc 統合、Cloud Run ベース、対応言語、コールドスタート対策、AWS Lambda 比較、無料枠・料金体系を網羅。

* Google Cloud and Spanner are trademarks of Google LLC. For the latest information, see the official Spanner documentation.

Check what you learned with practice questions

Practice with certification-focused question sets

View GCP Exam Prep
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Google Cloud

Google Cloud Certification Roadmap (2026)

Choose your GCP certification path — Foundational, Associate...

Google Cloud

CDL Cloud Digital Leader: Complete Exam Guide (2026)

Pass the Cloud Digital Leader exam — cloud business value, G...

Google Cloud

GAIL Generative AI Leader: Complete Exam Guide (2026)

Pass the Generative AI Leader exam — Gemini, Vertex AI, Work...

Google Cloud

Vertex AI Fundamentals for GCP Certs (2026)

Vertex AI basics every cert candidate needs — Workbench, Pip...

Google Cloud

Associate Cloud Engineer (ACE): Complete Guide (2026)

Pass the Associate Cloud Engineer exam — Console, gcloud, pr...

Browse all Google Cloud articles (103)
© 2026 NicheeLab All rights reserved.