-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2.13.1][#11269] YSQL: Add session variable to enable upsert…
… mode for inserts Summary: Speed up YSQL bulk loads by introducing the `yb_enable_upsert_mode` session variable. When set to true, inserts skip the lookup of any keys being inserted, thereby, enabling faster inserts. The default value for this flag is false. To enable the flag: ``` SET yb_enable_upsert_mode=true ``` To disable the flag: ``` SET yb_enable_upsert_mode=false ``` Test Plan: ybd --java-test 'org.yb.pgsql.TestBatchCopyFrom' We expect the following behaviors when bulk loading via COPY command: 1) Indexes should be updated just like a normal INSERT 2) Foreign key integrity should be maintained just like a normal INSERT 3) Disable batching if the table contains non-FK trigger as per the following [change](7c428da). Original commit: D16241 / c6b90bb Reviewers: ena, lnguyen, smishra Reviewed By: smishra Subscribers: yql, mihnea, dmitry Differential Revision: https://phabricator.dev.yugabyte.com/D16656
- Loading branch information
1 parent
42ee151
commit 985231d
Showing
5 changed files
with
259 additions
and
1 deletion.
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
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