Docs Home Quickstart Learn CockroachDB SQL Learn CockroachDB SQL JavaScript/TypeScript JavaScript/TypeScript JavaScript/TypeScript JavaScript/TypeScript JavaScript/TypeScript Python Python Python Python Go Go Go Go 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 Connect to a Cluster Use Connection Pools Overview Create a Database Create a User-defined Schema Create a Table Add Secondary Indexes Change and Remove Objects Online Schema Changes Use 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 Select Rows of Data Reusable Views Subqueries Create Temporary Tables Paginate Results AS OF SYSTEM TIME Follower Reads 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 SQL Performance Best Practices Performance Tuning Recipes Overview Indexes Cost-Based Optimizer Vectorized Execution Engine Load-Based Splitting 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 Create an Account Create a CockroachDB Serverless (Basic) Cluster Connect to Your Cluster Quickstart with CockroachDB Dedicated 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 Plan Your Cluster Manage a CockroachDB Serverless (Basic) Cluster Manage a CockroachDB Dedicated 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 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 Authentication Overview Single Sign-On (SSO) Configure Cloud Organization SSO Configure SQL Authentication for Hardened Serverless Cluster Security Network Authorization SQL Audit Logging Managing Access in CockroachDB Cloud Authentication Encryption Authorization SQL Audit Logging GSSAPI Authentication Single Sign-on Rotate Security Certificates Cluster Overview Page Alerts Page Tools Page Statements Page Sessions Page Transactions 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 Upgrade Policy Upgrade a cluster Upgrade to CockroachDB v21.2 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 Use Changefeeds Create and Configure Changefeeds Changefeed Sinks Changefeeds in Multi-Region Deployments Monitor and Debug Changefeeds Changefeed Examples Stream a Changefeed from CockroachDB Cloud to Snowflake Advanced Changefeed Configuration Architecture Overview SQL Layer Transaction Layer Distribution Layer Replication Layer Storage Layer Life of a Distributed Transaction Reads and Writes Overview Admission Control SQL Overview PostgreSQL Compatibility Full SQL Grammar Keywords & Identifiers Constants Selection Queries Table Expressions Common Table Expressions Scalar Expressions NULL Handling Overview ADD COLUMN ADD CONSTRAINT ADD REGION (Enterprise) ALTER COLUMN ALTER DATABASE ALTER DEFAULT PRIVILEGES ALTER INDEX ALTER PARTITION (Enterprise) ALTER PRIMARY KEY ALTER RANGE ALTER ROLE ALTER SCHEMA ALTER SEQUENCE ALTER TABLE ALTER TYPE ALTER USER ALTER VIEW EXPERIMENTAL_AUDIT BACKUP BEGIN CANCEL JOB CANCEL QUERY CANCEL SESSION COMMENT ON COMMIT CONFIGURE ZONE CONVERT TO SCHEMA 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 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 {session variable} RESET CLUSTER SETTING RESTORE RESUME JOB RESUME SCHEDULES REVOKE ROLLBACK SAVEPOINT SELECT SELECT FOR UPDATE SET {session variable} SET CLUSTER SETTING SET LOCALITY SET PRIMARY REGION (Enterprise) SET SCHEMA SET TRANSACTION SHOW {session variable} 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 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 Overview ARRAY BIT BOOL BYTES COLLATE DATE DECIMAL ENUM FLOAT INET INT INTERVAL JSONB 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 Working 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 Experimental Features Cluster Settings Security Overview Authentication Authorization Encryption Cockroach Commands 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 DB Console Overview Cluster Overview Page Overview Dashboard Hardware Dashboard Runtime Dashboard SQL Dashboard Storage Dashboard Replication 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 Transaction Retry Error Reference Cluster API Cloud API Logging Levels and Channels Log Formats Notable Event Types Diagnostics Reporting Overview Benchmarking Instructions Benchmarking Instructions Benchmarking Instructions Benchmarking Instructions Benchmarking Instructions 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