Using benchmarks and profiles to optimize CockroachDB's execution engine
Rafi (he/him) started a career in backend software engineering six years ago. He has experience using distributed systems, creating microservice architectures, honing best practices for observability and incident response, and developing customer-facing features. In May 2019 he joined Cockroach Labs because he was excited to work on building a distributed SQL database.
No video of the event yet, sorry!
OLTP databases are specialized for serving high-throughput queries that read or write a small number of rows. Still, users often also expect good performance on analytic queries that read a lot of rows, like large scans, joins, or aggregations. This motivated us to seriously investigate how to improve the performance of these types of queries in CockroachDB, and to begin working on a new SQL execution engine. We found that using a concept called vectorized execution, which operates over data in a column-oriented rather than a row-oriented fashion, could make more efficient use of modern CPUs and result in substantial performance improvements.
In this talk, we use an easy-to-follow example in Golang to discuss how we built the new vectorized engine and why it results in up to a 4x speed improvement on industry-standard benchmarks.
- 2020 March 23 16:10
- 50 min
- Postgres Conference 2020