|
Dynamic compilation of user-defined functions in PL/pgSQL language
V. M. Dzhidzhoevab, R. A. Buchatskiya, M. V. Pantilimonova, A. N. Tomilinba a Ivannikov Institute for System Programming of the Russian Academy of Sciences
b Lomonosov Moscow State University
Abstract:
Many modern RDBMS provide procedural extensions for SQL programming language, which allow users to perform server-side complex computations. Use of such extensions improves modularity and code reuse, simplifies programming of application logic, and helps developers to avoid network overhead and enhance performance. Interpretation is mostly used to execute SQL queries and procedural extensions code, resulting in significant computational overhead because of indirect function calls and performing of generic checks. Moreover, most RDBMS use different engines for SQL queries execution and procedural extensions code execution, and it is necessary to perform additional computations to switch between different engines. Thus, interpretation of SQL queries combined with interpretation of procedural extensions code may drastically degrade performance of RDBMS. One solution is to use a dynamic compilation technique. In this paper, we describe the technique of dynamic compilation of PL/pgSQL procedural language for the PostgreSQL database system using LLVM compiler infrastructure. Dynamic compiler of PL/pgSQL procedural language is developed as part of PostgreSQL queries dynamic compiler. Proposed technique helps to get rid of computational overhead caused by interpretation usage. Synthetic performance tests show that the developed solution speeds up SQL queries execution by several times.
Keywords:
dynamic compilation, JIT-compilation, query execution, UDF, DBMS, PostgreSQL, PL/pgSQL, LLVM.
Citation:
V. M. Dzhidzhoev, R. A. Buchatskiy, M. V. Pantilimonov, A. N. Tomilin, “Dynamic compilation of user-defined functions in PL/pgSQL language”, Proceedings of ISP RAS, 32:5 (2020), 67–80
Linking options:
https://www.mathnet.ru/eng/tisp544 https://www.mathnet.ru/eng/tisp/v32/i5/p67
|
Statistics & downloads: |
Abstract page: | 117 | Full-text PDF : | 96 | References: | 26 |
|