CockroachDB review: Distributed SQL shifts into high gear

CockroachDB 19.2.2 impresses with lower latency, higher throughput, greater scalability, and new fully managed CockroachCloud service

At a Glance

When I reviewed CockroachDB early in 2018, I found that the distributed SQL database, built on top of a transactional and consistent key-value store, was designed to survive disk, machine, rack, and even data center failures with minimal latency disruption and no manual intervention. That is all still true.

At the time, CockroachDB had three large deficits, in my opinion: Limited optimization of SQL JOIN queries, no fully managed service, and no support for JSON or Protobuf data types. I’m happy to report that all of these lacks have since been remedied. JOINs now use a cost-based optimizer, the CockroachCloud is in beta, and a JSONB data type has been implemented.

What’s still missing in CockroachDB? Quite a bit, if you care about PostgreSQL compatibility:

  • Stored procedures and functions
  • Triggers
  • Events
  • User-defined functions
  • Full-text functions and indexes
  • Geospatial functions and indexes
  • Drop primary key
  • XML functions
  • Savepoints
  • Column-level privileges
  • XA syntax

Most existing OLTP PostgreSQL applications can be ported to CockroachDB with some workarounds at the application level. If you have used geospatial features (PostGIS) or full-text search, however, I don’t know of a good way to implement them in the current version of CockroachDB.

To continue reading this article register now

How to choose a low-code development platform