-
Notifications
You must be signed in to change notification settings - Fork 7
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
Analyze/improve query performance for Yugabyte #7
Comments
I'll look at this. About the error when creating the index, I don't expect it to happen if there are no other DDL appending at the same time.
|
|
Hi @FranckPachot. Thank you for your suggestions. I did another test and made sure the index was created correctly.
|
Yes, I thought that the PostgreSQL WindowAgg was smarter as there's no need to materialize all rows into temp to get the max() over a sorted set. I got it work with
This uses a well know postgres workaround for loose index scan and works in YugabyteDB 2.15.1 (was not in 2.15.0) |
Hi @FranckPachot. I've finally found the time to test your workaround and can confirm the query is very fast ( |
Hi @swoehrl-mw the latest release of YugabyteDB (
I don't think this optimization helps on PostgreSQL. Maybe on Timescale DB. |
Hi @FranckPachot. Thanks for the update. I will include that in the next benchmark round. |
With the newest version of YugabyteDB and some optimizations insert performance for YSQL has increased dramatically to about 295000 inserts/s in our testcase (copy mode, batch size 1000), bringing it up to par with the YCQL interface (which also increased slightly to about 290000).
But the query performance is unexpectedly slow. For the usecase with 500 million rows I get the following query times for our test queries:
psycopg2.errors.ConfigurationLimitExceeded: temporary file size exceeds temp_file_limit (1048576kB)
One more issue: When creating the index
events_device_ts
sometimes the following error happens:psycopg2.errors.InternalError_: Aborted: ERROR: Query error: schema version mismatch for table 000033e6000030008000000000004104: expected 1, got 0
. The index still seems to get created as running theCREATE INDEX
statement again yieldsNOTICE: relation "events_device_ts" already exists, skipping
.For reference the commands:
helm install yugabyte yugabytedb/yugabyte -f dbinstall/yugabyte-values.yaml --version 2.15.0
python run.py insert --target yugabyte_sql -w 16 -r 1 --num-inserts 31250000 --batch 1000 --primary-key sql
python run.py query --target yugabyte_sql -w 1 -r 1 --extra-option create_indices=true
@FranckPachot I hope your offer of help is still valid? I would be grateful for some pointers on how to deal with the
temp_file_limit
and any ideas on how to speed up the other queries. With the latest optimizations insert performance is formidable, so I would love to get query performance to match.The text was updated successfully, but these errors were encountered: