- Spanner is a managed relational database with GoogleSQL and PostgreSQL dialects, external consistency and synchronous replication across zones or regions.
- Capacity is bought in processing units (1,000 PUs = 1 node) from 100 PUs upwards; each node in a regional configuration covers three replicas in three zones.
- Editions set the features and price: Standard (regional, 99.99% SLA), Enterprise (graph, search, managed autoscaler) and Enterprise Plus (dual- and multi-region, up to 99.999% SLA).
- Spanner has no suspend mode and needs Spanner-aware schema design, so it is overkill for a typical single-region application that Cloud SQL or AlloyDB can serve.
What is Google Cloud Spanner?
Google Cloud Spanner (often called Cloud Spanner or simply the Spanner database) is a fully managed database service that combines relational, graph, key-value and search workloads. Google's documentation highlights transactional consistency at global scale, automatic synchronous replication for high availability, and two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL. Google's databases page says Spanner powers its own billion-user products such as Search, Gmail and YouTube.
The point of Spanner is that you do not trade consistency for scale. A conventional relational database such as Cloud SQL scales writes only as far as one primary server; NoSQL stores scale out but usually relax transactions or consistency. Spanner splits data across many servers by key range and still runs ACID transactions with serialisable isolation by default, across tables, splits and regions.
TrueTime and external consistency, simplified
Distributed databases struggle to agree on the order of transactions, because each server's clock drifts. Spanner relies on TrueTime, a highly available distributed clock on Google's servers that lets Spanner generate timestamps guaranteed to increase: a transaction that starts after another has finished always receives a later timestamp, whichever servers handle them.
With those timestamps and multi-version concurrency control, Spanner offers external consistency, which Google describes as the strictest concurrency guarantee for transactions: the system behaves as if transactions ran one after another, in the order they were observed to commit. Google's own banking example shows why it matters: if a deposit commits before a debit starts, no reader anywhere can see the debit without the deposit. Reads default to strong reads, and stale reads at an earlier timestamp are available when slightly old data is acceptable and lower latency matters.
How Spanner scales: nodes, processing units and replicas
When you create an instance you pick an instance configuration (where replicas live) and a compute capacity. Capacity is measured in processing units: 1,000 PUs equal one node, and below one node you set capacity in steps of 100 PUs. A node is a logical unit spread over several physical servers. Instances under 1,000 PUs are meant for smaller workloads and may scale non-linearly.
- Regional configurations keep three read-write replicas in three zones of one region; a write needs a quorum of two.
- Dual-region configurations hold six replicas, three in each region (Enterprise Plus).
- Multi-region configurations span more than two regions with five or more replicas (Enterprise Plus).
Compute capacity also sets the storage limit: 1,024 GiB per 100 PUs below one node, and 10 TiB per node above that, although you are billed only for storage actually used. You can scale capacity up or down, manually or with the managed autoscaler (Enterprise and Enterprise Plus) or Google's open source Autoscaler. Spanner has no suspend mode, so an idle instance still costs its full compute capacity. Google also warns that adding capacity does not cure lock contention or hotspots.
Spanner editions: Standard, Enterprise and Enterprise Plus
Spanner is sold in three editions. The edition decides which configurations and features you can use and the hourly node rate.
| Feature | Standard | Enterprise | Enterprise Plus |
|---|---|---|---|
| Availability SLA | 99.99% | 99.99% | Up to 99.999% |
| Configurations | Regional | Regional, optional read-only replicas | Regional, dual-region and multi-region |
| Models | Relational (GoogleSQL, PostgreSQL), key-value | Adds Spanner Graph | Adds Spanner Graph |
| Search | None | Full-text and vector search | Full-text and vector search |
| Scaling | Open source Autoscaler | Managed autoscaler, tiered storage | Managed autoscaler, tiered storage, geo-partitioning |
| Backups | Standard backups, 7-day PITR, scheduled backups | Adds incremental backups | Adds incremental backups |
| Committed use discounts | 20% (1 year), 40% (3 years) | 20% (1 year), 40% (3 years) | 20% (1 year), 40% (3 years) |
Designing for Spanner: keys, interleaving and the PostgreSQL interface
Spanner divides data among servers by primary key range, so key choice matters more than on a single-server database. Google warns against monotonically increasing keys such as an auto-incrementing integer, which send every insert to the end of the key space and create a hotspot on one server. Google's documented remedies include hashing the key into a leading column, version 4 UUIDs (random high-order bits) and bit-reversed sequential values.
Interleaved tables let you store child rows physically with their parent (for example, invoices with their customer) by declaring the child with INTERLEAVE IN PARENT and starting its primary key with the parent key. Foreign keys are also supported for relationships that do not need co-location.
The PostgreSQL interface lets you use PostgreSQL syntax, types and many clients (through the PGAdapter proxy), but it is not PostgreSQL: extensions, user-defined types and user-defined stored procedures are not supported, administrative tools such as pgAdmin are not supported, and Google notes that migrating an existing PostgreSQL application usually needs rework, for example of primary keys. If you want a drop-in PostgreSQL, look at AlloyDB or Cloud SQL for PostgreSQL.
When you need Spanner, and when it is overkill
Spanner earns its place when one database must take more writes than a single large primary can, must stay consistent across regions, or must meet a 99.999% availability target with multi-region replication. In our view, typical examples are global user and account systems, payments and ledgers, gaming back ends, inventory and large multi-tenant SaaS platforms. Google also offers a 90-day free trial instance with 10 GB of storage, which is a low-risk way to try the schema model.
It is overkill for most single-region applications. A small regional instance still costs a steady amount every hour because there is no suspend mode, schema design has to avoid hotspots, and the PostgreSQL interface is not full PostgreSQL. If your data fits comfortably on one server and a short failover is acceptable, Cloud SQL or AlloyDB will be simpler and cheaper. For analytics rather than transactions, use BigQuery. The Google Cloud database services comparison sets all the options side by side; see also CockroachDB vs PostgreSQL for a distributed SQL alternative outside Google Cloud.
Pricing
Prices from the provider's official pricing pages, checked 8 October 2026, region Iowa (us-central1), in USD, excluding tax. List prices only; discounts, commitments and your actual usage change the bill.
Spanner charges for compute capacity, database storage, backup storage, cross-region replication and some network egress. Regional compute in Iowa is listed per node-hour, including all three replicas: Standard 0.90 USD, Enterprise 1.23 USD, Enterprise Plus 1.71 USD, with one-year commitments at 0.72, 0.984 and 1.368 USD. Capacity below one node is billed pro rata (100 PUs is a tenth of a node), with a one-hour minimum for any capacity you provision. Regional SSD storage, including all three replicas, is 0.000410959 USD per GiB-hour (HDD 0.000082192), and regional backup storage 0.000136986 USD per GiB-hour. Intra-region replication is free.
Smallest regional instance: 100 processing units, Standard edition
- Regional configuration in us-central1, 100 PUs (0.1 node), running all month (730 hours)
- 50 GiB of SSD data, no backups, on-demand rate
- Excludes network egress and tax
| Item | Basis | Estimated per month |
|---|---|---|
| Compute | 0.1 node x 730 hours x 0.90 USD | 65.70 USD |
| SSD storage | 50 GiB x 730 hours x 0.000410959 USD | 15.00 USD |
| Estimated total | About 80.70 USD per month |
Production regional instance: 1 node, Enterprise edition
- Regional configuration in us-central1, 1 node (1,000 PUs), 730 hours, on-demand rate
- 500 GiB of SSD data and 500 GiB of backups
- Excludes network egress, read-only replicas and tax
| Item | Basis | Estimated per month |
|---|---|---|
| Compute | 1 node x 730 hours x 1.23 USD | 897.90 USD |
| SSD storage | 500 GiB x 730 hours x 0.000410959 USD | 150.00 USD |
| Backup storage | 500 GiB x 730 hours x 0.000136986 USD | 50.00 USD |
| Estimated total | About 1,097.90 USD per month |
Worked examples are estimates calculated from the list prices above; they are not quotes or measured bills.
Frequently asked questions
Is Spanner a SQL or NoSQL database?
Spanner is a relational database with SQL, schemas and ACID transactions, offered in GoogleSQL and PostgreSQL dialects. It also supports key-value access and, in the Enterprise editions, graph queries, full-text search and vector search.
What is the minimum size of a Spanner instance?
100 processing units, a tenth of a node. Instances below 1,000 PUs are intended for smaller data sizes and workloads and can store up to 1,024 GiB per 100 PUs. The pricing section shows what the smallest regional instance costs per month at Iowa list prices.
Does Spanner support PostgreSQL?
Spanner offers a PostgreSQL interface: you can create PostgreSQL-dialect databases and connect many PostgreSQL clients through PGAdapter. It supports a subset of PostgreSQL; extensions, user-defined types and stored procedures are not supported, so existing applications usually need some changes.
Is there a Spanner free trial?
Yes. A Spanner free trial instance runs for 90 days at no cost with up to 10 GB of storage, supports both dialects and includes Enterprise features such as vector search, full-text search and Spanner Graph. It then enters a 30-day grace period before deletion unless you upgrade.
Can Spanner scale to zero?
No. Google's documentation states that Spanner has no suspend mode, because compute capacity is a dedicated resource that also performs background work. You can reduce capacity down to 100 PUs, subject to storage and split limits, but not to zero.
Spanner or AlloyDB?
AlloyDB is the better fit for PostgreSQL applications in one region that need more read capacity or analytics, with near-complete PostgreSQL compatibility. Spanner is for workloads that need horizontal write scaling or strong consistency across regions and can adopt Spanner's schema rules.
Sources
- Spanner documentation
- Spanner: TrueTime and external consistency
- Spanner: Compute capacity, nodes and processing units
- Spanner: Regional, dual-region and multi-region configurations
- Spanner editions overview
- Spanner: Autoscaling overview
- Spanner: Schema and data model
- Spanner: PostgreSQL interface
- Spanner free trial instances
- Spanner pricing
- Google Cloud databases overview
Checked 8 October 2026.
How we research cloud database guides: our editorial method. CodeWithSQL earns nothing from the providers mentioned.