Pairing LLVM JIT With PostgreSQL Can Speed Up Database Performance

Written by Michael Larabel in LLVM on 26 September 2016 at 06:59 AM EDT. 3 Comments
Using the LLVM JIT with PostgreSQL can vastly speed up the query execution performance and shows off much potential but it hasn't been mainlined yet.

Dmitry Melnik presented at this month's LLVM Cauldron over speeding up the query execution performance of PostgreSQL by using LLVM. Particularly with complex queries, the CPU becomes the bottleneck for PostgreSQL rather than the disk. LLVM JIT is used for just-in-time compilation of queries.

Interpretation of Postgres queries can take over half of the execution time (56% is noted in one example) while using LLVM code generation lowered that query down to 6% of execution time.

Results published by the developer show it's possible to get 5~7x speedups on different synthetic tests and TPC-H while automatic code generation was faster by about 10%. This isn't the first time we've seen database developers toy with LLVM to try to significantly speed things up.

More details via these PDF slides or via the Cauldron presentation video embedded below.

Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week