Home / Companies / Cockroach Labs / Blog / Post Details
Content Deep Dive

Implementing column families in CockroachDB

Blog post from Cockroach Labs

Post Details
Company
Date Published
Author
Daniel Harrison
Word Count
1,135
Language
English
Hacker News Points
-
Summary

CockroachDB, a distributed SQL database built upon a transactional key-value store, has improved its performance by implementing column families, a technique commonly used in NoSQL databases. Initially, CockroachDB's format version stored each non-primary index column as a separate key-value entry, leading to inefficiencies such as repetitive data and transaction-level overheads. By grouping multiple columns into a single key-value entry, column families have allowed for significant performance enhancements, especially for tables with many columns. This change has been particularly successful, with benchmarks showing a fivefold increase in speed for operations on tables with 20 integer columns. The implementation also maintains backward compatibility and allows users to manually optimize column family assignments based on their query patterns. These advancements bring CockroachDB closer to its 1.0 release, showcasing a blend of SQL and NoSQL optimizations.