Docs Home
Quickstart
Learn CockroachDB SQL
Learn CockroachDB SQL
JavaScript/TypeScript
JavaScript/TypeScript
JavaScript/TypeScript
JavaScript/TypeScript
JavaScript/TypeScript
Python
Python
Python
Python
Golang
Golang
Golang
Golang
Java
Java
Java
Java
Ruby
Ruby
C# (.NET)
Rust
AWS Lambda
Google Cloud Run
Netlify
Vercel
Serverless Function Best Practices
Glossary
CockroachDB FAQs
SQL FAQs
Operational FAQs
Availability FAQs
Licensing FAQs
Enterprise Features
CockroachDB in Comparison
Developer Guide Overview
Install a Driver or ORM Framework
Connect to a Cluster
Use Connection Pools
Overview
Create a Database
Create a User-defined Schema
Create a Table
Secondary Indexes
Change and Remove Objects
Online Schema Changes
Computed Columns
Group Columns into Families
Index a Subset of Rows
Index Sequential Keys
Index JSON and Array Data
Index Expressions
Index Spatial Data
Scale to Multiple Regions
Insert Data
Update Data
Bulk-update Data
Delete Data
Bulk-delete Data
Batch Delete Expired Data with Row-Level TTL
Select Rows of Data
Reusable Views
Subqueries
Temporary Tables
Paginate Results
Follower Reads
AS OF SYSTEM TIME
Query Spatial Data
Transactions Overview
Advanced Client-side Transaction Retries
Test Your Application Locally
Troubleshoot Common Problems
Overview
Statement Tuning with EXPLAIN
Apply SQL Statement Performance Rules
Map SQL Activity using an Application Name
SQL Performance Best Practices
Performance Tuning Recipes
Overview
Indexes
Cost-Based Optimizer
Vectorized Execution Engine
Load-Based Splitting
Admission Control
Overview of Example Applications
Spring Boot with JDBC
Spring Boot with JPA
Overview
Overview
Global Application Use Case
Multi-region Database Schema
Set up a Development Environment
Develop a Global Application
Deploy a Global Application
Deploy a Python To-Do App with Flask, Kubernetes, and CockroachDB Cloud
Alembic
Flyway
Liquibase
DBeaver GUI
IntelliJ IDEA
Satori
HashiCorp Vault
SQL Playground
Create an Account
Plan a CockroachDB Serverless (Basic) Cluster
Create a CockroachDB Serverless (Basic) Cluster
Connect to Your Cluster
Optimize Your CockroachDB Serverless Workload
Plan a CockroachDB Dedicated Cluster
Create a CockroachDB Dedicated Cluster
Connect to Your Cluster
Move into Production
Install CockroachDB
Install CockroachDB
Install CockroachDB
Install CockroachDB
Start From Binary
Start From Binary
Start In Kubernetes
Start In Kubernetes
Start In Docker
Start In Docker
Start In Docker
Simulate a Multi-Region Cluster on localhost
Production Checklist
Overview
Single-Cluster Deployment
Single-Cluster Deployment
OpenShift Deployment
Multi-Cluster Deployment
Overview
On-Premises Deployment
On-Premises Deployment
Deploy on AWS
Deploy on AWS
Deploy on Azure
Deploy on Azure
Deploy on Digital Ocean
Deploy on Digital Ocean
Deploy on Google Cloud Platform GCE
Deploy on Google Cloud Platform GCE
Overview
How to Choose a Multi-Region Configuration
When to Use ZONE vs. REGION Survival Goals
When to Use REGIONAL vs. GLOBAL Tables
Data Domiciling with CockroachDB
Migrate to Multi-Region SQL
Table Partitioning
Overview
Development
Basic Production
Regional Tables
Global Tables
Follower Reads
Follow-the-Workload
Replication & Rebalancing
Fault Tolerance & Recovery
Multi-Region Performance
Serializable Transactions
Spatial Data
Cross-Cloud Migration
JSON Support
Manage a CockroachDB Basic Cluster
Manage a CockroachDB Standard Cluster
Manage Billing
Use the Cloud API
Use the ccloud command
Pod Scheduling
Resource Management
Certificate Management
Cluster Scaling
Cluster Monitoring
Cluster Upgrades
Optimizing Performance
Backup and Restore Overview
Backup Architecture
Take and Restore Customer-Owned Backups
Use Managed-Service Backups
Full and Incremental Backups
Backups with Revision History and Point-in-time Restore
Encrypted Backup and Restore
Locality-aware Backup and Restore
Scheduled Backups
Restoring Backups Across Versions
Cloud Storage
Userfile Storage
Local File Server
Secure CockroachDB Cloud Clusters
Overview
Manage CMEK
Authentication Overview
Single Sign-On (SSO)
Configure Cloud Organization SSO
Certificate Authentication for SQL Clients in CockroachDB Advanced Clusters
Network Authorization
SQL Audit Logging
Export Cloud Organization Audit Logs
CockroachDB Cloud Access Management Overview and FAQ
Managing Access in CockroachDB Cloud
Use the CockroachDB CLI to provision a development cluster
Manage PKI certificates with HashiCorp Vault
Create Security Certificates using OpenSSL
Use Online Certificate Status Protocol (OCSP)
Authentication
Encryption
Authorization
SQL Audit Logging
GSSAPI Authentication
Single Sign-on
Rotate Security Certificates
Configure SQL Authentication for Hardened Serverless Cluster Security
Use Hashicorp Vault's Dynamic Secrets
Cluster Overview Page
Alerts Page
Tools Page
Statements Page
Sessions Page
Transactions Page
Databases Page
Monitoring Clusters Overview
Common Issues to Monitor
Enable the Node Map
Use Prometheus and Alertmanager
Cluster API
Third-Party Monitoring Integration Overview
Monitor CockroachDB self-hosted with Datadog
Monitor with DBmarlin
Monitor with Kibana
Overview
Configure Logs
Logging Use Cases
Export Logs From CockroachDB Advanced
Upgrade Policy
Upgrade a cluster
Upgrade to CockroachDB
Manage Long-Running Queries
Node Shutdown
Disaster Recovery
Replication Controls
Troubleshooting Overview
Common Errors and Solutions
Troubleshoot Cluster Setup
Troubleshoot Statement Behavior
Troubleshoot CockroachDB Cloud
Replication Reports
Support Resources
File an Issue
Migration Overview
Use the Schema Conversion Tool
Migrate data using AWS DMS
Migrate from CSV
Migrate from Avro
Migrate from Shapefiles
Migrate from OpenStreetMap
Migrate from GeoJSON
Migrate from GeoPackage
Import Performance Best Practices
Export Spatial Data
Change Data Capture Overview
Create and Configure Changefeeds
Changefeed Messages
Changefeed Sinks
Changefeed Examples
Changefeeds on Tables with Column Families
Export Data with Changefeeds
Changefeeds in Multi-Region Deployments
Monitor and Debug Changefeeds
Stream a Changefeed from CockroachDB Cloud to Snowflake
Stream a Changefeed to a Confluent Cloud Kafka Cluster
Advanced Changefeed Configuration
Architecture Overview
SQL Layer
Transaction Layer
Distribution Layer
Replication Layer
Storage Layer
Life of a Distributed Transaction
Reads and Writes Overview
SQL Overview
PostgreSQL Compatibility
Full SQL Grammar
Keywords & Identifiers
Constants
Selection Queries
Cursors
Table Expressions
Common Table Expressions
Scalar Expressions
NULL Handling
Overview
ADD COLUMN
ADD CONSTRAINT
ADD REGION (Enterprise)
ADD SUPER REGION (Enterprise)
ALTER BACKUP (Enterprise)
ALTER CHANGEFEED (Enterprise)
ALTER COLUMN
ALTER DATABASE
ALTER DEFAULT PRIVILEGES
ALTER INDEX
ALTER PARTITION (Enterprise)
ALTER PRIMARY KEY
ALTER RANGE
ALTER RANGE ... RELOCATE
ALTER ROLE
ALTER SCHEMA
ALTER SEQUENCE
ALTER SUPER REGION (Enterprise)
ALTER TABLE
ALTER TYPE
ALTER USER
ALTER VIEW
EXPERIMENTAL_AUDIT
BACKUP
BEGIN
CANCEL JOB
CANCEL QUERY
CANCEL SESSION
COMMENT ON
COMMIT
CONFIGURE ZONE
COPY FROM
CREATE CHANGEFEED (Enterprise)
CREATE DATABASE
CREATE INDEX
CREATE ROLE
CREATE SCHEDULE FOR BACKUP
CREATE SCHEMA
CREATE SEQUENCE
CREATE STATISTICS
CREATE TABLE
CREATE TABLE AS
CREATE TYPE
CREATE USER
CREATE VIEW
DELETE
DROP COLUMN
DROP CONSTRAINT
DROP DATABASE
DROP REGION (Enterprise)
DROP SUPER REGION (Enterprise)
DROP TYPE
DROP INDEX
DROP ROLE
DROP SCHEDULES
DROP SCHEMA
DROP SEQUENCE
DROP TABLE
DROP USER
DROP VIEW
EXPERIMENTAL CHANGEFEED FOR
EXPLAIN
EXPLAIN ANALYZE
EXPORT
GRANT
IMPORT
IMPORT INTO
INSERT
JOIN
LIMIT/OFFSET
ORDER BY
OWNER TO
PARTITION BY (Enterprise)
PAUSE JOB
PAUSE SCHEDULES
PLACEMENT (RESTRICTED | DEFAULT)
REASSIGN OWNED
REFRESH
RENAME COLUMN
RENAME CONSTRAINT
RENAME DATABASE
RENAME INDEX
RENAME TABLE
RELEASE SAVEPOINT
RESET CLUSTER SETTING
RESET {session variable}
RESET {storage parameter}
RESTORE
RESUME JOB
RESUME SCHEDULES
REVOKE
ROLLBACK
SAVEPOINT
SELECT
SELECT FOR UPDATE
SET CLUSTER SETTING
SET {session variable}
SET {storage parameter}
SET LOCALITY
SET PRIMARY REGION (Enterprise)
SET SCHEMA
SET TRANSACTION
SHOW BACKUP
SHOW CLUSTER SETTING
SHOW COLUMNS
SHOW CONSTRAINTS
SHOW CREATE
SHOW CREATE SCHEDULE
SHOW DATABASES
SHOW DEFAULT PRIVILEGES
SHOW ENUMS
SHOW FULL TABLE SCANS
SHOW GRANTS
SHOW INDEX
SHOW JOBS
SHOW LOCALITY
SHOW PARTITIONS (Enterprise)
SHOW RANGES
SHOW RANGE FOR ROW
SHOW REGIONS
SHOW {session variable}
SHOW SUPER REGIONS
SHOW ROLES
SHOW SCHEDULES
SHOW SCHEMAS
SHOW SEQUENCES
SHOW SESSIONS
SHOW STATEMENTS
SHOW STATISTICS
SHOW SAVEPOINT STATUS
SHOW TABLES
SHOW TRACE FOR SESSION
SHOW TRANSACTIONS
SHOW TYPES
SHOW USERS
SHOW ZONE CONFIGURATIONS
SPLIT AT
SURVIVE {ZONE,REGION} FAILURE
TRUNCATE
UNSPLIT AT
UPDATE
UPSERT
VALIDATE CONSTRAINT
WITH {storage parameter}
Overview
ARRAY
BIT
BOOL
BYTES
COLLATE
DATE
DECIMAL
ENUM
FLOAT
INET
INT
INTERVAL
JSONB
OID
SERIAL
STRING
TIME
TIMESTAMP
UUID
Overview
Check
Default Value
Foreign Key
Not Null
Primary Key
Unique
Functions and Operators
Window Functions
Name Resolution
Overview
crdb_internal
information_schema
pg_catalog
pg_extension
Overview
Work with Spatial Data
Spatial and GIS Glossary
POINT
LINESTRING
POLYGON
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON
GEOMETRYCOLLECTION
Well Known Text (WKT)
Well Known Binary (WKB)
GeoJSON
SRID 4326 - longitude and latitude
ST_Contains
ST_Within
ST_Intersects
ST_CoveredBy
ST_Covers
ST_Disjoint
ST_Equals
ST_Overlaps
ST_Touches
ST_ConvexHull
ST_Union
Cluster Settings
Security Overview
Authentication
SASL/SCRAM-SHA-256 Secure Password-based Authentication
Authorization
Encryption
Public Key Infrastructure (PKI) and Transport Layer Security (TLS)
Customer-Managed Encryption Keys (CMEK)
Payment Card Industry Data Security Standard (PCI DSS)
cockroach Commands Overview
Client Connection Parameters
cockroach start
cockroach init
cockroach start-single-node
cockroach cert
cockroach sql
cockroach sqlfmt
cockroach node
cockroach nodelocal upload
cockroach auth-session
cockroach demo
cockroach debug ballast
cockroach debug encryption-active-key
cockroach debug job-trace
cockroach debug list-files
cockroach debug merge-logs
cockroach debug tsdump
cockroach debug zip
cockroach statement-diag
cockroach gen
cockroach userfile upload
cockroach userfile list
cockroach userfile get
cockroach userfile delete
cockroach version
cockroach workload
cockroach import
The cockroach-sql command
DB Console Overview
Cluster Overview Page
Overview Dashboard
Hardware Dashboard
Runtime Dashboard
SQL Dashboard
Storage Dashboard
Replication Dashboard
Distributed Dashboard
Queues Dashboard
Slow Requests Dashboard
Changefeeds Dashboard
Overload Dashboard
Custom Chart
Databases Page
Sessions Page
Statements Page
Transactions Page
Network Latency Page
Hot Ranges Page
Jobs Page
Advanced Debug Page
Metrics
Transaction Retry Error Reference
Cluster API
Cloud API
Logging Levels and Channels
Log Formats
Notable Event Types
API Support Policy
Diagnostics Reporting
Overview
Benchmarking Instructions
Benchmarking Instructions
Benchmarking Instructions
Benchmarking Instructions
Benchmarking Instructions
CockroachDB Feature Availability
Tools Supported by Cockroach Labs
Tools Supported by the Community
Latest Production Release
All Releases
v25.1
v24.3
v24.2
v24.1
Release Support Policy
Known Limitations
CockroachDB Cloud
CockroachDB Kubernetes Operator
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Technical Advisories
Unsupported Versions
Online Courses