Featured Blog Texture

Blog

Product

Geo-Partitioning-2-by-Lea-Heinrich-1

Product

Improving application performance with Duplicate Indexes

* As of CockroachDB 23.1 we no longer use the duplicate indexes topology pattern. Instead, we use global tables. When you’re distributing a SQL database geographically, it can be tough to get fast application performance. Data often has to make long, round trip journeys across the world and is restricted by a speed limit (the speed of light).

 Piyush Singh

Piyush Singh

April 14, 2020

GORM 1200x400

Product

Build a Go app with GORM for CockroachDB

Back in 2015 the early Cockroach Labs engineers made a decision to write this massive, complex application in Go. Since then we have, on many occassions, discussed our use of Go in blogs and on stage.

1536574967915

Dan Kelly

March 18, 2020

multirow by lea heinrich final-1

Product

What are hash sharded indexes and why do they matter?

I ended an amazing internship this past fall on the KV (Key-Value) team at Cockroach Labs (responsible for the transaction, distribution and replication layers of CockroachDB). This blog post delves into my work on adding native support for creating hash sharded indexes in CockroachDB, as a way to significantly improve performance on sequential workloads. CockroachDB uses range partitioning by default, as opposed to hash partitioning. As explained in our CTO Peter Mattis’s blog post, a key-value store with range partitioning resembles a distributed balanced tree whereas one with hash partitioning is closer to a distributed hash map. In particular, range partitioning outperforms hash partitioning for the most common SQL workloads like range scans. However, load under range partitioning can become imbalanced for access patterns that focus on a specific range of data, since all traffic is served by a small subset of all the ranges. Sequential insert traffic is a common example of such an access pattern and is much better suited to hash partitioning.

Aayush Shah

March 13, 2020

jOOQ-1

Product

Build a Java app with CockroachDB and jOOQ

As of jOOQ's 3.13.0 release, jOOQ fully supports CockroachDB. The CockroachDB SQL dialect is now fully supported for future jOOQ and CockroachDB versions.

Charlotte Dillon

February 19, 2020

Django-how-to-1

Product

How to use CockroachDB with your Django application on Ubuntu

Django is a high-level flexible framework for building Python applications quickly. Applications run on Django store data, by default, into a SQLite database file, but lots of Django users find themselves needing to switch to a more performant database in production, one with better availability or scalability.

Artem Ervits

February 10, 2020

crdb-blog-1

Product

Announcing CockroachDB support for Django ORM

``` Django includes a full-featured ORM that simplifies interactions with a database--it’s one of the reasons it’s become one of the most popular web frameworks. Even so, you’re still left to manage scale yourself, and ensure the database is resilient and always on. That can be really hard to do with common Django databases like Postgres, SQLite, and MySQL. And that’s why today, we’re excited to announce a new CockroachDB backend for the Django ORM. ``` Using CockroachDB and Django gives you the ease of writing in Python while getting all the benefits of an open source, distributed SQL database. CockroachDB shards automatically, is naturally resilient, and is highly available. Here’s how to get started:

Charlotte Dillon

January 27, 2020

WriteSkew JaimeJacob

Product

Yugabyte vs. CockroachDB: Unpacking competitive benchmark claims

Yugabyte frequently compares themselves to CockroachDB. We investigated their claims. This is our analysis of CockroachDB vs. Yugabyte v2.0.0.

Peter Mattis

Peter Mattis

November 19, 2019

CRCloud Blog-header-1

Product

Announcing CockroachDB 19.2

Today, we’re proud to announce the release of CockroachDB 19.2, which significantly improves the latency, reliability, and usability of CockroachDB. CockroachDB 19.2 pushes the bounds of what a distributed SQL database can do. We’re bringing the latency of distributed transactions closer to the theoretical minimum, continuing to bolster the resilience and reliability of our enterprise and open core product, and we’re making CockroachDB easier to use than ever before. Not only does 19.2 introduce new features for better ease-of-use, we’re also launching Cockroach University to improve the experience of learning and using the product. Cockroach University is a free online learning tool for developers and architects who want to gain a fundamental understanding of distributed databases and deep knowledge of CockroachDB’s functionality and architecture.

SQLSmith Header IMG 2

Product

How we built a vectorized execution engine

CockroachDB is an OLTP database, specialized for serving high-throughput queries that read or write a small number of rows. As we gained more usage, we found that customers weren’t getting the performance they expected from analytic queries that read a lot of rows, like large scans, joins, or aggregations. In April 2018, we started to seriously investigate how to improve the performance of these types of queries in CockroachDB, and began working on a new SQL execution engine. In this blog post, we use example code to discuss how we built the new engine and why it results in up to a 4x speed improvement on an industry-standard benchmark.

Alfonso Subiotto Marques

October 31, 2019