NewSQL & Distributed SQL - 12 Database Guide

VerifiedSafe

Provides production-level operational guidance for 12 NewSQL and distributed SQL databases including CockroachDB, YugabyteDB, TiDB, Google Spanner, Vitess, PlanetScale, Citus, SingleStore, OceanBase, Neon, and AlloyDB. Covers multi-region topologies, sharding, HTAP, and CAP tradeoffs. Useful when implementing globally distributed SQL, horizontal scaling, or HTAP workloads.

Sby Skills Guide Bot
Data & AIAdvanced
1206/2/2026
Claude Code
#newsql#distributed-database#horizontal-scaling#sql

Recommended for

Our review

This skill provides a comprehensive reference for 12 NewSQL and distributed SQL databases, including configuration, consistency models, scaling strategies, and operational patterns for production deployments.

Strengths

  • Covers a wide range of leading distributed SQL databases.
  • Includes specific reference files for deep dives.
  • Provides a comparison table and anti-patterns to avoid common mistakes.
  • Addresses the CAP theorem context for distributed consistency.

Limitations

  • Requires familiarity with SQL and database concepts.
  • May not include the latest updates for each database.
  • Focuses on operational aspects, not application-level optimizations.
When to use it

Use when designing or operating globally distributed, horizontally scalable SQL databases in production.

When not to use it

Do not use for simple single-node database tasks or if you need a shallow overview without operational depth.

Security analysis

Safe
Quality score90/100

The skill provides informational guidance on distributed SQL databases with no destructive or exfiltrating instructions. The Bash tool is allowed but not used in a risky manner; no actual commands are specified.

No concerns found

Examples

Multi-region setup with CockroachDB
I need to set up a CockroachDB cluster across three regions with geo-partitioning and ensure serializable isolation. Load the CockroachDB reference and guide me through the multi-region topology steps.
HTAP workload with TiDB
I want to use TiDB for hybrid transactional and analytical processing. Load the TiDB reference and explain how to configure TiFlash for columnar analytics while maintaining OLTP performance.
Sharding Vitess VSchema
I need to design a Vitess sharding schema for a user table with billions of rows. Load the Vitess reference and help me define a VSchema with proper shard keys and table colocation.

name: newsql-distributed description: | Deep operational guide for 12 NewSQL/distributed SQL databases. CockroachDB (multi-region, geo-partitioning, CDC), YugabyteDB (YSQL/YCQL, DocDB, xCluster), TiDB (TiKV/TiFlash HTAP), Spanner (TrueTime), Vitess (sharding, VSchema), PlanetScale, Citus, SingleStore, OceanBase. Use when implementing globally distributed SQL, horizontal scaling, or HTAP workloads. allowed-tools: Read, Grep, Glob, Bash

You are a NewSQL and distributed SQL database specialist providing production-level guidance across 12 database technologies.

Distributed SQL Comparison

| Database | Consistency | PG Compatible | Scale | HTAP | Managed | |---|---|---|---|---|---| | CockroachDB | Serializable | Wire + SQL | Auto sharding | No | CockroachDB Cloud | | YugabyteDB | Serializable | YSQL (PG) + YCQL (CQL) | Auto sharding | No | YugabyteDB Aeon | | TiDB | Snapshot isolation | MySQL wire | TiKV auto-split | Yes (TiFlash) | TiDB Cloud | | Google Spanner | External consistency | PG via pgAdapter | Auto splits | No | Fully managed | | Vitess | MySQL-dependent | MySQL wire | Manual (VSchema) | No | PlanetScale | | PlanetScale | MySQL-dependent | MySQL wire | Vitess sharding | No | Fully managed | | Citus | PG defaults (RC) | Native PG extension | Manual distribution | No | Azure Cosmos for PG | | SingleStore | Read committed | MySQL wire | Shard-nothing | Yes (columnstore) | SingleStore Helios | | OceanBase | RC / Snapshot | MySQL + Oracle modes | Auto partitioning | Yes | OceanBase Cloud | | Neon | PG defaults | Full PG | Scale-to-zero | No | Fully managed serverless | | AlloyDB | PG defaults | Full PG | Read replicas | Analytics accelerator | Google Cloud managed |

Reference Files

Load the relevant reference for the task at hand:

CAP Theorem Context

NewSQL databases choose CP (Consistency + Partition Tolerance):

  • Raft/Paxos consensus ensures consistency across partitions
  • Automatic failover preserves availability in practice
  • Latency increases with geographic distance between replicas
  • Use follower reads (CRDB) or bounded staleness reads for geo-distributed latency reduction

Anti-Patterns

  • Auto-increment primary keys as shard keys (hotspot on insert)
  • Cross-shard JOINs without table colocation (scatter-gather overhead)
  • Long-running transactions in serializable isolation (contention explosion)
  • Missing retry loop for 40001 RETRY_SERIALIZABLE in CockroachDB applications
  • Blocking DDL on distributed tables without expand-contract migration
  • Skipping connection pooling (per-connection overhead is significant at scale)
Related skills