babelfish_extensions
babelfish_extensions copied to clipboard
Jira babel 3756
Description
SPI_plan_get_cached_plan call inside exec_stmt_exexsql leads to performance overhead
- SPI_plan_get_cached_plan call inside exec_stmt_exexsql leads to performance overhead, so calls to the function are reduced. SPI_plan_get_cached_plan is only called for the queries which needed the cachedPLan
- The SPI_plan_get_cached_plan is only called for queries with OUTPUT clause, and with TRIGGERS on queries
- Reducing the calls leads to a query time execution of 1.6% on average for the queries as other bottlenecks were observed when tried to optimise further.
- Further optimisation regarding the simple expressions is done in Jira babel 3755 together with this a performance improvement of around 11% is noticed for simple queries(queries that do not access a database relation)
Issues Resolved
SPI_plan_get_cached_plan calls reduced and called only when necessary
Check List
- [x] Commits are signed per the DCO using --signoff
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.