forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance optimisation for INSERT BULK
Initially Insert Bulk was implemented using SPI_execute_with_args, which practically were single inserts in the executor level. This made database migration slow for our users, with this task we have moved on from SPI to use PG’s multi insert functionality. PG’s multi insert feature which is much faster since we can write just a single WAL for all of the inserts at the end and we need to lock/unlock page only once. Moreover, there is no need to parse/plan/optimise the query (When compared to initial implementation) thus bypassing directly to inserting multiple tuples into the table at once. A speedup of 8x on average was achieved when compared to the initial implementation. Task: BABEL-3503 Authored-by: Kushaal Shroff <kushaal@amazon.com> Signed-off-by: Kushaal Shroff <kushaal@amazon.com>
- Loading branch information
1 parent
928f844
commit d91be29
Showing
9 changed files
with
1,117 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.