Fast Compilation and Execution of SQL Queries with WebAssembly

04/30/2021
by   Immanuel Haffner, et al.
0

Interpreted execution of queries, as in the vectorized model, suffers from interpretation overheads. By compiling queries this interpretation overhead is eliminated at the cost of a compilation phase that delays execution, sacrificing latency for throughput. For short-lived queries, minimizing latency is important, while for long-running queries throughput outweighs latency. Because neither a purely interpretive model nor a purely compiling model can provide low latency and high throughput, adaptive solutions emerged. Adaptive systems seamlessly transition from interpreted to compiled execution, achieving low latency for short-lived queries and high throughput for long-running queries. However, these adaptive systems pose an immense development effort and require expert knowledge in both interpreter and compiler design. In this work, we investigate query execution by compilation to WebAssembly. We are able to compile even complex queries in less than a millisecond to machine code with near-optimal performance. By delegating execution of WebAssembly to the V8 engine, we are able to seamlessly transition from rapidly compiled yet non-optimized code to thoroughly optimized code during execution. Our approach provides both low latency and high throughput, is adaptive out of the box, and is straight forward to implement. The drastically reduced compilation times even enable us to explore generative programming of library code, that is fully inlined by construction. Our experimental evaluation confirms that our approach yields competitive and sometimes superior performance.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/05/2020

Sampling Optimized Code for Type Feedback

To efficiently execute dynamically typed languages, many language implem...
research
02/04/2023

Practical View-Change-Less Protocol through Rapid View Synchronization

The emergence of blockchain technology has renewed the interest in conse...
research
02/06/2018

RDMAvisor: Toward Deploying Scalable and Simple RDMA as a Service in Datacenters

RDMA is increasingly adopted by cloud computing platforms to provide low...
research
06/26/2023

BBCA-LEDGER: High Throughput Consensus meets Low Latency

This paper presents BBCA-LEDGER, a Byzantine log replication technology ...
research
02/07/2021

Hemlock : Compact and Scalable Mutual Exclusion

We present Hemlock, a novel mutual exclusion locking algorithm that is e...
research
10/20/2021

Scheduling of Graph Queries: Controlling Intra- and Inter-query Parallelism for a High System Throughput

The vast amounts of data used in social, business or traffic networks, b...
research
03/07/2019

Shallow Overlay Trees Suffice for High-Throughput Consensus

All-to-all data transmission is a typical data transmission pattern in b...

Please sign up or login with your details

Forgot password? Click here to reset