News for hackers. Stuff that matters.

asubiotto

Re:Das Problem mit German Strings on Tuesday August 26, 2025 @05:44PM (#45032695)
Seems like it. Changed it back!
Re:Disk Spilling in a Vectorized Execution Engine on Wednesday July 08, 2020 @08:06AM (#23769063)
We haven't implemented disk spilling for aggregations yet. It's different from the algorithms discussed in this article in that the amount of memory used is proportional to the number of aggregation groups (buckets), rather than the number of input tuples. This makes it less likely that aggregations would need to spill to disk and requires a slightly specialized solution to figure out how to serialize intermediate aggregation results.

Sorting is a good idea. The in-memory aggregator could keep track of the aggregation columns of each bucket, sort the buckets and input that has not yet been processed and then perform an ordered aggregation on the sorted input using the already-computed intermediate result as a starting point for the group's aggregation result.

Another option is to partition the buckets and input, which would subdivide the aggregation and avoid a sort.

Re:How We Built a Vectorized SQL Engine on Monday November 11, 2019 @04:27PM (#21509094)
It's hard to say whether one would generally be a bigger gain than another without experimenting. We chose to focus on just execution because it was a relatively smaller project (with less side-effects) that still promised a large performance improvement. In the future, we might consider keeping data in columnar format on learner replicas to offer even better performance for users that would like to run OLAP-style queries on slightly stale data, but this would be a larger project.
Re:How We Built a Vectorized SQL Engine on Monday November 11, 2019 @03:32PM (#21508582)
CockroachDB does target OLTP workloads. Note that the vectorized SQL engine covered in this blog post is execution-only (and used only for queries that operate on many rows). The storage layer remains row-oriented so the write performance is not affected. Rows are columnarized before processing by the execution engine.
Re:How We Built a Vectorized SQL Engine on Monday November 11, 2019 @03:28PM (#21508544)
+1 avo is on our radar as a tool to use in the future
Re:Faster hash joiner with vectorized execution on Thursday January 31, 2019 @04:31PM (#19049074)
Indeed! We spent some time running isolated benchmarks before deciding to dive into the project: https://github.com/jordanlewis/exectoy