# Google Cloud Spanner vs TiDB

**Leader by Vioscale score:** TiDB

| Attribute | Google Cloud Spanner | TiDB |
|---|---|---|
| **Vioscale score** | 43.9 (39% (low)) | 59.5 (61% (medium)) |
| deployment.options | `{"cloud":true,"self_hosted":true}` | `{"cloud":true,"self_hosted":true}` |
| description.long | Google Cloud's globally distributed, multi-model database supporting relational, graph, key-value, and search capabilities with native PostgreSQL interface and Gemini AI integration. | An open-source distributed SQL database trusted by innovators to power transactional, AI, and other modern applications. |
| features.capabilities | `{"isolation":"serializable","sql_model":"full_sql","deployment":"managed","consistency":"strong","replication":"consensus","extensibility":true,"license_class":"proprietary","horizontal_scale":"distributed_native","acid_transactions":"full","automatic_failover":true,"wire_compatibility":"postgres"}` | `{"sql_model":"full_sql","license_class":"permissive","horizontal_scale":"distributed_native","acid_transactions":"full","wire_compatibility":"mysql"}` |
| integrations.count | 5 | 4 |
| integrations.list | `[{"name":"Gemini Enterprise Agent Platform"},{"name":"Gemini CLI"},{"name":"Model Context Protocol (MCP)"},{"name":"Agent Development Kit (ADK)"},{"name":"Data Agent Kit"}]` | `[{"name":"Cursor"},{"name":"JDBC"},{"name":"mysql-connector-python"},{"name":"MySQL"}]` |
| platform.support | - | `{"web":true}` |
| pricing | `{"type":"usage","summary":"Usage-based pricing: compute capacity (nodes/processing units, hourly), storage (monthly), backups, data replication, network bandwidth. Free 90-day trial instances. Optional 1-year and 3-year committed use discounts. Three editions available: Standard, Enterprise, and Enterprise Plus.","currency":"USD","freeTier":true,"sourceUrl":"https://cloud.google.com/spanner","retrievedAt":"2026-08-03T12:40:26.715Z","freeTrialDays":90,"billingPeriods":["hour","month"]}` | `{"type":"hybrid","plans":[{"free":true,"name":"TiDB Cloud Starter"},{"free":false,"name":"TiDB Cloud Dedicated","contactSales":true}],"freeTier":true,"sourceUrl":"https://www.pingcap.com","retrievedAt":"2026-08-13T16:48:29.248Z"}` |
| pricing.free_tier | yes | yes |
| pricing.model | commercial | freemium |
| pricing.price_level | low | low |
| pricing.transparent | - | no |
| reliability.sla_pct | - | 99.99 |
| reliability.status_page | yes | yes |
| security.gdpr | - | yes |
| security.pci | - | yes |
| security.soc2 | - | yes |

## Capabilities (Relational Databases)

| Capability | Google Cloud Spanner | TiDB |
|---|:--:|:--:|
| **Core** |  |  |
| SQL model | Full SQL | Full SQL |
| **Transactions** |  |  |
| ACID transactions | Full | Full |
| Highest isolation level | Serializable | - |
| **Consistency** |  |  |
| Consistency | Strong | - |
| **Scale** |  |  |
| Horizontal scale | Natively distributed | Natively distributed |
| **Replication** |  |  |
| Replication | Consensus (Raft/Paxos) | - |
| **Availability** |  |  |
| Automatic failover / HA | ✓ | - |
| **Deployment** |  |  |
| Deployment | Managed | - |
| Serverless / scale-to-zero | - | - |
| **Compatibility** |  |  |
| Wire compatibility | Postgres protocol | MySQL protocol |
| **Extensibility** |  |  |
| Extensions / plugins / UDFs | ✓ | - |
| **Licensing** |  |  |
| Licence class | Proprietary | Permissive OSS |
| **Data types** |  |  |
| JSON / document support | - | - |
| Geo / spatial | - | - |

*Source: Vioscale. Generated 2026-09-01T16:35:28.456Z. "-" = undocumented, not absent.*
