Performance is a feature: accelerating Postgres system performance with PL/Rust
No video of the event yet, sorry!
As applications grow in complexity, the choice of implementation language and the level at which algorithms are executed can significantly impact performance. Better designed and performing systems can also lead to significantly reduced infrastructure costs and energy consumption. This is an important consideration in your career path to becoming senior engineers and architects. This talk presents a rigorous analysis of the performance of a single complex algorithm implemented at different levels, showcasing how various programming environments and languages affect execution speed, memory consumption, and overall efficiency. By exploring common application development languages such as Python, PL/SQL & PL/pgSQL, PL/Python, and PL/Rust, alongside Rust, we aim to provide insights into how developers can optimize application performance and improve systems efficiency. The algorithm is first implemented in Python, known for its simplicity and flexibility but often criticized for its performance limitations in CPU-bound tasks. Next, the same algorithm is written in PL/pgSQL, the Procedural Language extension for Postgres’s dialect of SQL, which operates directly within the database and is designed for efficiency in data-intensive tasks. To complete the analysis, we implement the algorithm in PL/Python and PL/Rust, two PostgreSQL language extensions that allow developers to write user-defined functions in Python and Rust, respectively. These implementations showcase the performance difference when using application languages within the database context. The source code to these examples will be open sourced and available on GitHub. Come and learn how to hack in Postgres and grow your expertise as a developer.
- Date:
- Duration:
- 45 min
- Room:
- Conference:
- PGConf India, 2025
- Language:
- Track:
- Application Developer
- Difficulty:
- Medium