Note:
Cockroach Labs supports the current stable release and two releases prior. Therefore, this version will no longer be supported after the Spring 2020 release.

October 30, 2018

With the release of CockroachDB v2.1, we’ve made it easier than ever to migrate from MySQL and Postgres, improved our scalability on transactional workloads by 5x, enhanced our troubleshooting workflows in the Admin UI, and launched a managed offering to help teams deploy low-latency, multi-region clusters with minimal operator overhead.

Get future release notes emailed to you:

Downloads

Docker Image

copy
icon/buttons/copy
$ docker pull cockroachdb/cockroach:v2.1.0

Summary

This section summarizes the most significant, user-facing changes in v2.1.0. For a complete list of features and changes, including bug fixes and performance improvements, see the release notes for previous testing releases.

Managed Offering

The Managed CockroachDB offering is currently in Limited Availability and accepting customers on a qualified basis. The offering provides a running CockroachDB cluster suitable to your needs, fully managed by Cockroach Labs on GCP or AWS. Benefits include:

  • No provisioning or deployment efforts for you
  • Daily full backups and hourly incremental backups of your data
  • Upgrades to the latest stable release of CockroachDB
  • Monitoring to provide SLA-level support

For more details, see the Managed CockroachDB docs.

Enterprise Features

These new features require an enterprise license. Register for a 30-day trial license here.

Feature Description
Change Data Capture (Beta) Change data capture (CDC) provides efficient, distributed, row-level change feeds into Apache Kafka for downstream processing such as reporting, caching, or full-text indexing. Use the CREATE CHANGEFEED statement to create a new changefeed, which provides row-level change subscriptions.
Encryption at Rest (Experimental) Encryption at Rest provides transparent encryption of a node's data on the local disk.
EXPORT (Beta) The EXPORT statement exports tabular data or the results of arbitrary SELECT statements to CSV files. Using the CockroachDB distributed execution engine, EXPORT parallelizes CSV creation across all nodes in the cluster, making it possible to quickly get large sets of data out of CockroachDB in a format that can be ingested by downstream systems.

Core Features

These new features are freely available in the core version and do not require an enterprise license.

SQL

Feature Description
ALTER TABLE ... ALTER TYPE The ALTER TABLE ... ALTER TYPE statement changes a column's data type. Only type changes that neither require data checks nor data conversion are supported at this time.
ALTER COLUMN ... DROP STORED The ALTER TABLE ... ALTER COLUMN ... DROP STORED statement converts a stored, computed column into a regular column.
CANCEL JOB The CANCEL JOB statement can now be executed on long-running schema change jobs, causing them to terminate early and roll back. Also, the CANCEL JOBS variant of the statement lets you cancel multiple jobs at once.
CANCEL QUERIES The CANCEL QUERIES variant of the CANCEL QUERY statement lets you cancel multiple queries at once.
CANCEL SESSIONS The CANCEL SESSIONS variant of the CANCEL SESSION statement lets you stop multiple long-running sessions. CANCEL SESSION will attempt to cancel the currently active query and end the session.
Cost-Based Optimizer The cost-based optimizer seeks the lowest cost for a query, usually related to time. In versions 2.1 and later, CockroachDB's cost-based optimizer is enabled by default.
CREATE STATISTICS (Experimental) The CREATE STATISTICS statement generates table statistics for the cost-based optimizer to use.
EXPLAIN (DISTSQL) The DISTSQL option generates a physical query plan for a query. Query plans provide information around SQL execution, which can be used to troubleshoot slow queries.
EXPLAIN ANALYZE The EXPLAIN ANALYZE statement executes a SQL query and returns a physical query plan with execution statistics.
Fast Deletes for Interleaved Tables Under certain conditions, deleting rows from interleave tables that use ON DELETE CASCADE will use an optimized code path and run much faster.
Lookup Joins (Experimental) A lookup join is beneficial to use when there is a large imbalance in size between the two tables, as it only reads the smaller table and then looks up matches in the larger table. A lookup join requires that the right-hand (i.e., larger) table is indexed on the equality column.
public Role All users now belong to the public role, to which you can grant and revoke privileges.
SET (session variable)
SHOW (session variable)
Added the following options:
  • statement_timeout: The amount of time a statement can run before being stopped.
  • optimizer: The mode in which a query execution plan is generated. If set to on, the cost-based optimizer is enabled by default and the heuristic planner will only be used if the query is not supported by the cost-based optimizer; if set to off, all queries are run through the legacy heuristic planner.
SHOW STATISTICS (Experimental) The SHOW STATISTICS statement lists table statistics used by the cost-based optimizer.
SNAPSHOT isolation level Removed. Transactions that request to use SNAPSHOT are now mapped to SERIALIZABLE.
Subquery Support CockroachDB's cost-based optimizer supports several common types of correlated subqueries. A subquery is said to be "correlated" when it uses table or column names defined in the surrounding query.

CLI

Feature Description
cockroach demo The cockroach demo command starts a temporary, in-memory, single-node CockroachDB cluster and opens an interactive SQL shell to it.
cockroach start The new --advertise-addr flag recognizes both a hostname/address and port and replaces the --advertise-host and --advertise-port flags, which are now deprecated.

The new --listen-addr flag recognizes both a hostname/address and port and replaces the --host and --port flags, which are now deprecated for cockroach start but remain valid for other client commands.

The new --http-addr flag recognizes both a hostname/address and port and replaces the --http-host flag, which is now deprecated.
cockroach sql The cockroach sql command and other client commands that display SQL results now use the new table result formatter by default, replacing the previous formatter called pretty. This provides more compact and more reusable results.
cockroach zone Deprecated. The cockroach zone command has been deprecated. To manage replication zones, use the CONFIGURE ZONE statement to add, modify, reset, and remove replication zones.

Operations

Feature Description
Controlling Leaseholder Location Using replication zones, you can now specify preferences for where a range's leaseholders should be placed to increase performance in some scenarios.
DBeaver Support DBeaver, a cross-platform database GUI, has been thoroughly vetted and tested with CockroachDB v2.1.
Load-based Rebalancing In addition to the rebalancing that occurs when nodes join or leave a cluster, leases and replicas are rebalanced automatically based on the relative load across the nodes within a cluster. Note that depending on the needs of your deployment, you can exercise additional control over the location of leases and replicas by configuring replication zones.
Migration from Postgres and MySQL The IMPORT command now supports importing dump files from Postgres and MySQL.
Monitoring Kubernetes Deployments Kubernetes tutorials now feature steps on how to integrate withPrometheus, an open source tool for storing, aggregating, and querying timeseries data, and set up Alertmanager.
Multi-Cluster Kubernetes Deployments You can now orchestrate a secure CockroachDB deployment across three Kubernetes clusters, each in a different geographic region, using the StatefulSet feature to manage the containers within each cluster and linking them together via DNS.
Pipelining of Transactional Writes Transactional writes are pipelined when being replicated and when being written to disk, dramatically reducing the latency of transactions that perform multiple writes.
Preferring Local Networks The new --locality-advertise-addr flag on cockroach start can be used to tell nodes in specific localities to prefer local or private interfaces. This flag is useful when running a cluster across multiple networks, where nodes in a given network have access to a private or local interface while nodes outside the network do not.
Rolling Upgrade Auto-finalization By default, as soon as all nodes are running CockroachDB v2.1, the upgrade process will be auto-finalized. This will enable certain performance improvements and bug fixes introduced in the new version.
Viewing Node Status for an Unavailable Cluster The cockroach node status command can now be run even when majority of nodes are down. Running the command now shows an additional field: is_available.

Admin UI

Feature Description
Advanced Debugging Page (Experimental) The Advanced Debugging page provides links to advanced monitoring and troubleshooting reports and cluster configuration details.
Hardware Dashboard The Hardware dashboard lets you monitor CPU usage, disk throughput, network traffic, storage capacity, and memory.
Statements page The Statements page helps you identify frequently executed or high latency SQL statements. It also allows you to view the details of SQL statement fingerprints, which are groupings of similar SQL statements with literal values replaced by underscores.
User Authentication As of v2.1, users must have a username and password to access the Admin UI in a secure cluster.

Known Limitations

For information about limitations we've identified in CockroachDB v2.1, with suggested workarounds where applicable, see Known Limitations.

Documentation

Topic Description
Experimental Features This new page lists the experimental features that are available in CockroachDB v2.1.
Client Connection Parameters This new page describes the parameters used to establish a client connection. The client connection parameters determine which CockroachDB cluster they connect to, and how to establish this network connection.
Deploying CockroachDB with systemd The on-premises and cloud deployment tutorials now include instructions for using systemd to start the nodes of a cluster.
Manual and Automated Backups This page has been updated to provide both manual and automated backup guidance.
Migration Guide This new guide provides an overview of migrating to CockroachDB, as well as specific instructions for migrating from Postgres, migrating from MySQL, and migrating from CSV.
Networking Guidance The Production Checklist now provides a detailed explanation of network flags and scenarios.
Online Schema Changes This new page explains how CockroachDB updates table schema without imposing any downtown or negative consequences on applications.
Performance Benchmarking This page walks you through TPC-C performance benchmarking on CockroachDB. It measures tpmC (new order transactions/minute) on two TPC-C datasets: 1,000 warehouses (for a total dataset size of 200GB) on 3 nodes and 10,000 warehouses (for a total dataset size of 2TB) on 30 nodes.
Performance Tuning This new tutorial shows you essential techniques for getting fast reads and writes in CockroachDB, starting with a single-region deployment and expanding into multiple regions.
Secure "Build an App" Most client driver and ORM tutorials now provide code samples and guidance for secure clusters.
Serializable Transactions This new tutorial goes through a hypothetical scenario that demonstrates the importance of SERIALIZABLE isolation for data correctness.
SQL Basics Training In this new training, you learn how to use basic SQL statements.
Window Functions This new page provides information about window function support in CockroachDB.


Yes No