New in Public Preview – PostgreSQL Support and TiDB Cloud Filesystem

Key Takeaways

  • NewSQL databases scale horizontally like NoSQL while keeping ACID transactions and a standard SQL interface.
  • TiDB splits data into Regions, replicates each one as its own Raft group, and lets PD rebalance them automatically.
  • TiDB, CockroachDB, and Spanner differ most on wire compatibility, deployment model, and licensing.
  • Trip.com moved hotel settlement onto TiDB after MySQL sharding couldn’t keep transactions consistent across suppliers, hotels, and users.

When a relational database hits its scaling ceiling, a team usually faces two bad options: shard it by hand and inherit years of migration debt, or move to a NoSQL system and give up the ACID guarantees a payments or inventory system cannot safely live without. NewSQL databases close that gap. They scale horizontally the way NoSQL systems do, while keeping the transactional consistency a relational system provides. This guide covers what a NewSQL database is, how TiDB implements the model, and where NewSQL databases now show up in AI agent workloads that need durable, queryable state.

What is a NewSQL Database?

A NewSQL database is a distributed relational database that provides the horizontal scalability of NoSQL systems while keeping full ACID compliance and a standard SQL interface. It exists because traditional RDBMSs scale vertically, adding capacity to one machine until it hits a hardware ceiling, while NoSQL systems scale horizontally but typically sacrifice strong consistency to do it. NewSQL systems close that gap by partitioning data across many nodes and using a consensus protocol, most commonly Raft or Paxos, to keep every replica of that data in agreement.

Three mechanisms define the category:

  • Distributed architecture: the system partitions data across multiple servers instead of keeping it on one machine.
  • Horizontal scalability: a cluster handles more load by adding nodes, not by upgrading a single server.
  • Consensus-based consistency: a majority-vote protocol like Raft keeps every replica of a piece of data in agreement, so the system stays ACID-compliant as it scales out.

How TiDB Delivers NewSQL’s Promise

TiDB is an open-source, MySQL-compatible NewSQL database built for hybrid transactional and analytical processing (HTAP), so a single cluster runs both OLTP and OLAP workloads without a separate ETL pipeline.

TiDB separates compute from storage. TiKV, the storage layer, splits data into Regions and replicates each Region across multiple nodes as its own Raft group, with one replica acting as the leader that serves reads and writes. The Placement Driver (PD) balances Regions across the cluster automatically, which is what lets TiKV scale past 100 TB without manual resharding. TiFlash, TiDB’s columnar storage engine, replicates data from TiKV in real time and serves analytical queries through a Massively Parallel Processing (MPP) engine, keeping OLAP queries off the transactional path.

That architecture delivers both halves of the NewSQL promise directly. Horizontal scale comes from Region-based sharding and automatic rebalancing. Consistency comes from Raft consensus inside every Region, not from an eventual-consistency model added after the fact.

TiDB vs Other NewSQL Databases

CockroachDB and Google Spanner are the two NewSQL databases most often compared against TiDB. All three provide horizontal scale and strong consistency; where they differ is compatibility, deployment model, and licensing.

AttributeTiDBCockroachDBGoogle Spanner
Scaling modelHorizontal; Regions split and rebalance automatically; compute separate from storageHorizontal; ranges split and rebalance automaticallyHorizontal; splits managed by Google
ConsistencyRaft consensus per RegionRaft consensus per rangePaxos plus TrueTime
CompatibilityMySQL wire protocolPostgreSQL wire protocolGoogleSQL or PostgreSQL dialect
DeploymentSelf-managed or TiDB CloudSelf-hosted or CockroachDB CloudGoogle Cloud managed service
LicensingOpen source (Apache 2.0)Proprietary enterprise license; free for businesses under $10M revenueProprietary, usage-based pricing

CockroachDB licensing reflects the single enterprise license that replaced its Core edition with v24.3 in November 2024.

For a team already running MySQL, TiDB’s wire-protocol compatibility means existing queries, drivers, and tooling carry over with minimal rework. CockroachDB offers the same advantage for PostgreSQL shops. Spanner trades that portability for Google’s managed infrastructure, which removes operational overhead but ties the workload to Google Cloud.

Licensing has become a real differentiator. CockroachDB retired its free Core edition in November 2024, so self-hosting it now requires an enterprise license, free only for individuals and businesses under $10 million in annual revenue. TiDB, TiKV, and TiFlash remain open source under Apache 2.0, which matters to teams that want to self-host without a revenue threshold or a vendor relationship attached.

Real-World NewSQL Use Case: Trip.com’s Hotel Settlement

Trip.com, the travel platform behind Trip.com, Qunar, and Skyscanner, runs its hotel settlement business on TiDB. Settlement reconciles commissions with hotel suppliers based on orders, at billion-record scale, and Trip.com treats it as a P0 business: data integrity is non-negotiable, and range calculations across that data have to finish in seconds.

The workload previously ran on SQL Server for transactions and ClickHouse for analytics. Trip.com’s default transactional stack is MySQL, but sharding did not fit this workload. Settlement data spans three dimensions, suppliers, hotels, and users, and no single shard key could keep transactions consistent across all of them. Cross-shard transactional consistency is precisely the problem NewSQL exists to solve.

TiDB now handles all of the transactional work and part of the analytical work, on data expected to reach about 8 TB. The workload reads more than nine times as often as it writes, peaks at 2,300 queries per second, and holds P99 latency under 10 ms and P999 under 40 ms. The move also let Trip.com’s DBA team decommission SQL Server entirely.

For Trip.com’s real-time customer data platform, which tests the HTAP side of the same architecture, see TiDB HTAP: From NoSQL Tradeoffs to Hybrid Processing.

NewSQL for AI and Agentic Workloads

AI agents that maintain memory across a conversation or a multi-step task need a data layer that does two things a single-purpose vector store cannot: hold transactional state, such as a user’s session, an order, or a tool call’s result, with strong consistency, and serve fast retrieval over embeddings for RAG lookups, at the same scale.

Bolting a vector database onto a separate transactional store solves the retrieval half but reintroduces the cross-database consistency problem NewSQL exists to eliminate: an agent’s memory write and its transactional write can drift out of sync. A NewSQL database with native vector search support avoids that split, keeping agent state and retrieval in the same consistency domain. That combination matches the horizontal-scale, ACID-compliant profile that defines NewSQL, applied to a newer class of workload.

Start Building on TiDB’s NewSQL Architecture

NewSQL databases exist to remove the tradeoff between scale and consistency. TiDB’s Multi-Raft and TiFlash architecture implements that model directly, and Trip.com’s settlement workload shows it holding up where MySQL sharding could not.

Try TiDB Cloud Starter free to run your own workload against it.

NewSQL Database FAQs

What is the difference between NewSQL and NoSQL?

  • NewSQL keeps full ACID guarantees and a SQL interface; NoSQL typically trades strong consistency for scale and flexibility.
  • NewSQL scales through consensus-replicated partitions; most NoSQL systems scale through eventual consistency across replicas.
  • NewSQL fits workloads that cannot tolerate stale or conflicting reads, like financial transactions.
  • NoSQL fits workloads where schema flexibility or write throughput matters more than strict consistency.

Is TiDB a NewSQL Database?

  • Yes, by the broad definition, but TiDB is more precisely a distributed SQL database.
  • NewSQL is the older, broader label, dating from 2011, for relational databases that promised NoSQL-style scale while keeping SQL and ACID. It spans several designs, including in-memory engines and sharding middleware, and not all of them distribute data automatically.
  • Distributed SQL is the narrower category: one logical database that partitions data automatically, replicates it through consensus, and runs ACID transactions across nodes.
  • TiDB fits that definition. TiKV splits data into Raft-replicated Regions, and transactions span nodes with no sharding layer for the application to manage.
  • Every distributed SQL database qualifies as NewSQL, but not every NewSQL database is distributed SQL.

What are examples of NewSQL databases?

  • TiDB: MySQL-compatible, HTAP-focused, open source.
  • CockroachDB: PostgreSQL-compatible, range-based Raft replication.
  • Google Spanner: Google Cloud managed, Paxos and TrueTime-based.
  • YugabyteDB: PostgreSQL-compatible SQL plus a Cassandra-compatible API.

Is NewSQL suitable for AI agent workloads?

  • It keeps retrieval and state updates inside a single consistency domain.
  • Yes, when the database combines transactional consistency with native vector search.
  • It avoids the sync problem created by pairing a separate vector store with a transactional database.
  • It scales horizontally as agent memory and session volume grow.

Last updated October 9, 2026

💬 Let’s Build Better Experiences — Together

Join our Discord to ask questions, share wins, and shape what’s next.

Join Now