This page describes production limits for Cloud Spanner.
These values are subject to change.
|Databases per instance||100|
|Tables per database||2,048|
|Indexes per database||4,096|
|Indexes per table||32|
|Columns per table||1,024|
|Size of data per column||10 MB|
|Storage size per node||2 TB 1|
|Table interleaving depth||6
A top-level table with child table(s) has depth 1.
A top-level table with grandchild table(s) has depth 2, etc.
|Commit size (including indexes)||100 MB|
|Mutations per commit (including indexes) 2||20,000|
|Request size other than for commits 3||10 MB|
|Schema size||10 MB|
|Schema change size||10 MB|
|Administrative actions request size (not including the actions above)||1 MB|
|Concurrent reads per session||100|
|Sessions per database per node||10,000|
|Rate for administrative actions||5 per second per project
(averaged over 100 seconds)
|Database ID length||2-30 characters|
|Table name length||1-128 characters|
|Column name length||1-128 characters|
|Index name length||1-128 characters|
|Maximum query statement length||1 million characters|
|Number of columns in a table key||16
Includes key columns shared with any parent table
|Number of columns in an index key||16
The number of indexed columns (except for STORING columns) plus the number of primary key columns in the base table
|Total size of a table or index key||8 KB
Includes the size of all columns that make up the key
1. To provide high availability and low latency for accessing a database, Cloud Spanner requires that there is a node for every 2 TB of data in the database. For example, if you have a database of size 3.5 TB, you need to provision at least 2 nodes. That will handle your database until it grows to 4 TB. Once your database reaches 4 TB, you need to add another node to allow the database to grow. Otherwise, writes to the database will fail. For a smooth growth experience, add nodes before this limit is reached for your database.
2. Insert and update operations count with the multiplicity of the number of columns they affect. For example, inserting values into one key column and four non-key columns count as five mutations total for the insert. Delete and delete range operations count as one mutation regardless of the number of columns affected.
3. This includes requests for creating a database, updating a database, reading, streaming reads, executing SQL queries, and executing streaming SQL queries.