CockroachDB
Author: a | 2025-04-24
CockroachDB Cloud Overview. CockroachDB Cloud is a fully-managed service run by Cockroach Labs, which simplifies the deployment and management of CockroachDB. This page provides an introduction to CockroachDB Cloud and provides an overview of each type of cluster: CockroachDB Standard, CockroachDB Basic, and CockroachDB Advanced.
Contributing to CockroachDB - CockroachDB - Confluence
Skip to content Navigation Menu GitHub Copilot Write better code with AI Security Find and fix vulnerabilities Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes Discussions Collaborate outside of code Code Search Find more, search less Explore Learning Pathways Events & Webinars Ebooks & Whitepapers Customer Stories Partners Executive Insights GitHub Sponsors Fund open source developers The ReadME Project GitHub community articles Enterprise platform AI-powered developer platform Pricing Provide feedback Saved searches Use saved searches to filter your results more quickly ;ref_cta:Sign up;ref_loc:header logged out"}"> Sign up the scalable, survivable, SQL database Verified We've verified that the organization cockroachdb controls the domain: www.cockroachlabs.com Overview Repositories Projects Packages People Sponsoring Pinned Loading CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement. Go 30.6k 3.9k CockroachDB user documentation HTML 195 468 RocksDB/LevelDB inspired key-value database in Go Go 5.2k 489 Go error library with error portability over the network Go 2.2k 66 Repositories --> Type Select type All Public Sources Forks Archived Mirrors Templates Language Select language All Astro C C# C++ Clojure Dockerfile Go HTML Java JavaScript Mustache Protocol Buffer Python Ruby Rust Scala Shell Smarty Starlark TSQL TypeScript Vim Script Sort Select order Last updated Name Stars Showing 10 of 209 repositories cockroach Public CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement. cockroachdb/cockroach’s past year of commit activity pebble Public RocksDB/LevelDB inspired key-value database in Go cockroachdb/pebble’s past year of commit activity cockroachdb/cockroach-go’s past year of commit activity cockroachdb/cockroach-operator’s past year of commit activity docs Public CockroachDB user documentation cockroachdb/docs’s past year of commit activity demo-video-code Public A collection of code examples to accompany demo videos. cockroachdb/demo-video-code’s past year of commit activity Go 1 0 0 0 Updated Mar 21, 2025 cockroachdb/helm-charts’s past year of commit activity Go 89 Apache-2.0 150 45 31 Updated Mar 21, 2025 cockroachdb/activerecord-cockroachdb-adapter’s past year of commit activity Ruby 106 Apache-2.0 51 21 7 Updated Mar 20, 2025 stress Public A fork of Golang's stress function. cockroachdb/stress’s past year of commit activity Go 5 BSD-3-Clause 6 0 1 Updated Mar 20, 2025 errors Public Go error library with error portability over the network cockroachdb/errors’s past year of commit activity Most used topics. CockroachDB Cloud Overview. CockroachDB Cloud is a fully-managed service run by Cockroach Labs, which simplifies the deployment and management of CockroachDB. This page provides an introduction to CockroachDB Cloud and provides an overview of each type of cluster: CockroachDB Standard, CockroachDB Basic, and CockroachDB Advanced. CockroachDB Cloud Overview. CockroachDB Cloud is a fully-managed service run by Cockroach Labs, which simplifies the deployment and management of CockroachDB. This page provides an introduction to CockroachDB Cloud and provides an overview of each type of cluster: CockroachDB Standard, CockroachDB Basic, and CockroachDB Advanced. RazorSQL is a database GUI tool, SQL editor, and database browser that supports over 50 databases including CockroachDB. RazorSQL provides a custom CockroachDB database browser tailored to CockroachDB, a CockroachDB SQL editor with CockroachDB specific features and syntax highlighting, custom CockRoachDB GUI tools, and CockroachDB specific RazorSQL is a database GUI tool, SQL editor, and database browser that supports over 50 databases including CockroachDB. RazorSQL provides a custom CockroachDB database browser tailored to CockroachDB, a CockroachDB SQL editor with CockroachDB specific features and syntax highlighting, custom CockRoachDB GUI tools, and CockroachDB specific The CockroachDB source simplifies self-hosted to dedicated/CockroachDBaaS migrations, as well as CockroachDB dedicated to CockroachDB serverless migrationsor Contributing to CockroachDB. Reporting bugs in CockroachDB. Evaluate the complexity of your project. Code reviews. Productivity Tips. What is a Good CockroachDB PR. Getting and building CockroachDB from source Complicated to set up and even harder to maintain. One of the Principal Engineers on the project suggested taking a look at CockroachDB, a cloud-native distributed database that met their requirements:High availability (99.999%)Guaranteed data consistency Ability to scale across multiple regions and multiple clouds Easy, horizontal scale (no manual sharding required)Stash started building on CockroachDB core (the free, open-source version) and found the transition from PostgreSQL to be seamless. Once they were ready to implement their initial design, they requested an enterprise license so they could access certain CockroachDB features, such as backups and the capability to extend across multiple regions. “There’s a lot of databases out there on the market. However, on paper, CockroachDB met all of our requirements to build a highly available platform. We felt like we were making an informed decision about our tech stack, and CockroachDB truly lived up to the expectations that it promised.”-Michael Swendener,Senior DevOps EngineerSource of TruthThough the Stash Core project took years to implement in full, Stash’s GTM timeline for this aspect of the new banking infrastructure was a compact six months. After the development phase, the team reports that they had “no issues getting into production with CockroachDB.” After a successful soft launch in September 2022, they opened the platform up to all customers in December 2022. CockroachDB serves as a system of record (or source of truth) for the entire banking infrastructure. It processes and stores all types of mission-critical workloads, including banking data, customer data, PII, accounting info, and more. Right now, Stash is self-hosting CockroachDB in a single AWS region and plans to expand out to four regions in the near future. They’re running a multi-region cluster now to test its functionality before moving into production. As mentioned above, running your application across multiple regions and multiple clouds is a great approach when designing fault-tolerant systems and reducing risk for your business.Stash also uses Kubernetes alongside CockroachDB. Since CockroachDB and K8s have the same distributed principles, they work well together and make it easier for engineers to build distributed applications.”CockroachDB is our source of truth… It stores everything for our banking partner. When building a mission-critical application, we wanted to choose the right technologies that would guarantee our customer’s data would never be at risk. CockroachDB lived up to its expectations that it promised.”-Jordan Larrigan,Engineering ManagerSupport systemWhile Stash’s engineering team already had PostgreSQL experience and felt comfortableComments
Skip to content Navigation Menu GitHub Copilot Write better code with AI Security Find and fix vulnerabilities Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes Discussions Collaborate outside of code Code Search Find more, search less Explore Learning Pathways Events & Webinars Ebooks & Whitepapers Customer Stories Partners Executive Insights GitHub Sponsors Fund open source developers The ReadME Project GitHub community articles Enterprise platform AI-powered developer platform Pricing Provide feedback Saved searches Use saved searches to filter your results more quickly ;ref_cta:Sign up;ref_loc:header logged out"}"> Sign up the scalable, survivable, SQL database Verified We've verified that the organization cockroachdb controls the domain: www.cockroachlabs.com Overview Repositories Projects Packages People Sponsoring Pinned Loading CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement. Go 30.6k 3.9k CockroachDB user documentation HTML 195 468 RocksDB/LevelDB inspired key-value database in Go Go 5.2k 489 Go error library with error portability over the network Go 2.2k 66 Repositories --> Type Select type All Public Sources Forks Archived Mirrors Templates Language Select language All Astro C C# C++ Clojure Dockerfile Go HTML Java JavaScript Mustache Protocol Buffer Python Ruby Rust Scala Shell Smarty Starlark TSQL TypeScript Vim Script Sort Select order Last updated Name Stars Showing 10 of 209 repositories cockroach Public CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement. cockroachdb/cockroach’s past year of commit activity pebble Public RocksDB/LevelDB inspired key-value database in Go cockroachdb/pebble’s past year of commit activity cockroachdb/cockroach-go’s past year of commit activity cockroachdb/cockroach-operator’s past year of commit activity docs Public CockroachDB user documentation cockroachdb/docs’s past year of commit activity demo-video-code Public A collection of code examples to accompany demo videos. cockroachdb/demo-video-code’s past year of commit activity Go 1 0 0 0 Updated Mar 21, 2025 cockroachdb/helm-charts’s past year of commit activity Go 89 Apache-2.0 150 45 31 Updated Mar 21, 2025 cockroachdb/activerecord-cockroachdb-adapter’s past year of commit activity Ruby 106 Apache-2.0 51 21 7 Updated Mar 20, 2025 stress Public A fork of Golang's stress function. cockroachdb/stress’s past year of commit activity Go 5 BSD-3-Clause 6 0 1 Updated Mar 20, 2025 errors Public Go error library with error portability over the network cockroachdb/errors’s past year of commit activity Most used topics
2025-03-25Complicated to set up and even harder to maintain. One of the Principal Engineers on the project suggested taking a look at CockroachDB, a cloud-native distributed database that met their requirements:High availability (99.999%)Guaranteed data consistency Ability to scale across multiple regions and multiple clouds Easy, horizontal scale (no manual sharding required)Stash started building on CockroachDB core (the free, open-source version) and found the transition from PostgreSQL to be seamless. Once they were ready to implement their initial design, they requested an enterprise license so they could access certain CockroachDB features, such as backups and the capability to extend across multiple regions. “There’s a lot of databases out there on the market. However, on paper, CockroachDB met all of our requirements to build a highly available platform. We felt like we were making an informed decision about our tech stack, and CockroachDB truly lived up to the expectations that it promised.”-Michael Swendener,Senior DevOps EngineerSource of TruthThough the Stash Core project took years to implement in full, Stash’s GTM timeline for this aspect of the new banking infrastructure was a compact six months. After the development phase, the team reports that they had “no issues getting into production with CockroachDB.” After a successful soft launch in September 2022, they opened the platform up to all customers in December 2022. CockroachDB serves as a system of record (or source of truth) for the entire banking infrastructure. It processes and stores all types of mission-critical workloads, including banking data, customer data, PII, accounting info, and more. Right now, Stash is self-hosting CockroachDB in a single AWS region and plans to expand out to four regions in the near future. They’re running a multi-region cluster now to test its functionality before moving into production. As mentioned above, running your application across multiple regions and multiple clouds is a great approach when designing fault-tolerant systems and reducing risk for your business.Stash also uses Kubernetes alongside CockroachDB. Since CockroachDB and K8s have the same distributed principles, they work well together and make it easier for engineers to build distributed applications.”CockroachDB is our source of truth… It stores everything for our banking partner. When building a mission-critical application, we wanted to choose the right technologies that would guarantee our customer’s data would never be at risk. CockroachDB lived up to its expectations that it promised.”-Jordan Larrigan,Engineering ManagerSupport systemWhile Stash’s engineering team already had PostgreSQL experience and felt comfortable
2025-04-08Using CockroachDB spatial features with Active Record, see the activerecord-cockroachdb-adapter README.GeoDjangoStarting with CockroachDB 20.2.x and django-cockroachdb 3.1.3, CockroachDB is compatible with GeoDjango. For information about using CockroachDB spatial features with GeoDjango, see the django-cockroachdb README.Note:Most PostGIS-compatible client libraries are incompatible with CockroachDB's spatial features without an adapter.TroubleshootingFor general CockroachDB troubleshooting information, see Troubleshooting Overview.If you need help troubleshooting an issue with our spatial support, please get in touch using our Support resources.PerformanceIn order to avoid full table scans, make sure to add indexes to any columns that are accessed as part of a predicate in the WHERE clause. For geospatial columns, the index will only be used if the column is accessed using an index-accelerated geospatial function from the list below (all of these functions work on GEOMETRY data types; a * means that a function also works on GEOGRAPHY data types):ST_Covers (*)ST_CoveredBy (*)ST_ContainsST_ContainsProperlyST_CrossesST_DWithin (*)ST_DFullyWithinST_EqualsST_Intersects (*)ST_OverlapsST_TouchesST_WithinTo use a version of a function from the list above that will explicitly not use the index, add an underscore (_) to the beginning of the function name, e.g., _ST_Covers.You can check which queries are using which indexes using the EXPLAIN statement. For more information about general query tuning (including index usage), see Optimize Statement Performance.The syntax for adding an index to a geometry column is CREATE INDEX index_name ON table_name USING GIST (column_name).For example, to add an index to the geom column of the sample tornadoes table: icon/buttons/copy CREATE INDEX tornado_geom_idx ON tornadoes USING GIST (geom);This creates a (spatial) GIN index on the geom column.Because CockroachDB is a scale-out, multi-node database, our spatial indexing strategy is based on a space-filling curve/quad-tree design (also known as "divide the space"), rather than the R-Tree data structure used by some other spatial databases (also known as "divide the objects"). Other databases that use a "divide the
2025-04-09Version v25.1.1 On this page This tutorial shows you how run a simple application built with TypeORM.Step 1. Start CockroachDBChoose your installation methodYou can install a CockroachDB Serverless cluster using either the CockroachDB Cloud Console, a web-based graphical user interface (GUI) tool, or ccloud, a command-line interface (CLI) tool.Create a free clusterNote:Organizations without billing information on file can only create one CockroachDB Basic cluster.If you haven't already, sign up for a CockroachDB Cloud account.Log in to your CockroachDB Cloud account.On the Clusters page, click Create cluster.On the Select a plan page, select Basic.On the Cloud & Regions page, select a cloud provider (GCP or AWS) in the Cloud provider section. In the Regions section, select a region for the cluster. Refer to CockroachDB Cloud Regions for the regions where CockroachDB Basic clusters can be deployed. To create a multi-region cluster, click Add region and select additional regions.Click Next: Capacity.On the Capacity page, select Start for free. Click Next: Finalize.On the Finalize page, click Create cluster.Your cluster will be created in a few seconds and the Create SQL user dialog will display.Create a SQL userThe Create SQL user dialog allows you to create a new SQL user and password.Enter a username in the SQL user field or use the one provided by default.Click Generate & save password.Copy the generated password and save it in a secure location.Click Next.Currently, all new SQL users are created with admin privileges. For more information and to change the default settings, see Manage SQL users on a cluster.Get the connection informationThe Connect to cluster dialog shows information about how to connect to your cluster.Select Parameters only from the Select option dropdown.Copy the connection information for each parameter displayed and save it in a secure location.Follow these steps to create a CockroachDB Serverless cluster using the ccloud
2025-04-13