-
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] Insert throughput drops by ~3x with a "GENERATED ALWAYS AS IDENTITY" column in the table schema. #22837
Comments
The default cache is 100 (set by
|
We tried increasing cache (1000 / 10000 / 1000000), but didn't see any difference in the latency or throughput. |
@sonalsagarwal do you use prepared statement or is it planned each time? I've seen recently that during the planning phase it reads dependencies from the catalog (which is in yb-master so network call) |
Apparently, the difference is that, without secondary indexes, Write operation with
Write operation with
|
Summary: There are differences in implementation of autoincrement columns defined as "serial" and "generated as identity". Serial columns have defaults, defined as nextval('<sequence name'). As a builtin function nextval is considered safe to run in a single shard transactions. Identity columns are implemented by special expression node NextValueExpr, which was on the list of nodes preventing single shard expressions. In fact, NextValueExpr is safe, so removing it from the list. Jira: DB-11735 Test Plan: ./yb-build.sh --java-test 'org.yb.pgsql.TestPgTransactions#testIdentityNoTransaction' Reviewers: tnayak Reviewed By: tnayak Subscribers: tnayak, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D36248
Summary: 25d427a [PLAT-13975] Support for non-restart gflags upgrade in Kubernetes universes 26cd461 [PLAT-14165] Health check to report on time drift. 9b83b80 [#23036] docdb: Switch CloneStateInfo object from scoped_refptr to std::shared_ptr e5399d9 [PLAT-14511] Improved yba installer migrations to allow some versions to not exist 0db5d16 [14279] YSQL: Add basic flag validation for ysql_pg_conf_csv, ysql_hba_conf_csv and ysql_ident_conf_csv 841fbdb [#21829] docdb: Fix scan that does not honor timeouts in certain scenarios, to not run into runaway scan scenarios. f20048b [#22840] DocDB: Fix DFATAL in WaitQueue::Impl::HandleWaiterStatusRpcResponse da6cbd5 [DOC-396] Set up SSO using Jumpcloud (#22861) d0e93c9 [PLAT-14104] Network configuration module for YNP 63cceb3 [#22837] YSQL: Fix fast path insert into tables with identity columns 5c7715f [#23057] YSQL: Fix missing newlines and pfree b3bc338 [doc][yba] DR clarifications (#23050) f897398 [#21500] YSQL: Skip schema version mismatch tests with Connection Manager enabled e77b95b [PLAT-14504] - feat : db audit log ui improvements 7e289b5 [#21859] ASH: Make ASH uuid data human readable when viewed through /rpcz 23acae3 [#22957] YSQL: Make connection sticky for GUC variables that cannot be SET in an explicit transaction with YSQL Connection Manager cfa6300 [#22556] docdb: Speed up backward scans for flat doc reader for packed row V2 a446f27 [PLAT-14530] - fix : Edit Azure Provider is failing "I worked around it by removing the two PNG files from the revision." - Steve Varnau Test Plan: Jenkins: rebase: pg15-cherrypicks Reviewers: jason, tfoucher Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D36285
…dentity columns Summary: Original commit: 63cceb3 / D36248 There are differences in implementation of autoincrement columns defined as "serial" and "generated as identity". Serial columns have defaults, defined as nextval('<sequence name'). As a builtin function nextval is considered safe to run in a single shard transactions. Identity columns are implemented by special expression node NextValueExpr, which was on the list of nodes preventing single shard expressions. In fact, NextValueExpr is safe, so removing it from the list. Jira: DB-11735 Test Plan: ./yb-build.sh --java-test 'org.yb.pgsql.TestPgTransactions#testIdentityNoTransaction' Reviewers: tnayak Reviewed By: tnayak Subscribers: yql, tnayak, smishra Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D36302
… identity columns Summary: Original commit: 63cceb3 / D36248 There are differences in implementation of autoincrement columns defined as "serial" and "generated as identity". Serial columns have defaults, defined as nextval('<sequence name'). As a builtin function nextval is considered safe to run in a single shard transactions. Identity columns are implemented by special expression node NextValueExpr, which was on the list of nodes preventing single shard expressions. In fact, NextValueExpr is safe, so removing it from the list. Jira: DB-11735 Test Plan: ./yb-build.sh --java-test 'org.yb.pgsql.TestPgTransactions#testIdentityNoTransaction' Reviewers: tnayak Reviewed By: tnayak Subscribers: yql, tnayak, smishra Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D36299
Jira Link: DB-11735
Description
Steps to reproduce:
Inserted rows in the tables with 100 threads for 5 mins.
Results :
Cluster details : 3-node RF3 1AZ m6i.4xlarge
Please refer attached metrics screenshot for the 2 runs.
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: