-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ysql] Speed up YSQL inserts by skipping lookup of keys being inserted - essentially providing upsert semantics. #11269
Labels
Comments
rthallamko3
changed the title
[DocDB] Speed up YSQL inserts by skipping lookup of keys being inserted.
[ysql] Speed up YSQL inserts by skipping lookup of keys being inserted - essentially providing upsert semantics.
Mar 15, 2022
paullee-yb
added a commit
that referenced
this issue
Apr 22, 2022
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). Reviewers: ena, lnguyen, smishra Reviewed By: lnguyen, smishra Subscribers: dmitry, mihnea, yql Differential Revision: https://phabricator.dev.yugabyte.com/D16241
paullee-yb
added a commit
that referenced
this issue
Apr 22, 2022
… 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
paullee-yb
added a commit
that referenced
this issue
Apr 22, 2022
…ode 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/D16655
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
During bulk load (for example inserts by Copy command), skip lookup of the key being inserted, to speed up the inserts. This is similar to the upsert mode that is supported for YCQL.
The text was updated successfully, but these errors were encountered: