-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Feature] Optimize performance for select count() for tables with primary key #13
Comments
I found the problem for c1 = 1000000. Based on (d391e5b) I was missing: SET GLOBAL mysql_experimental_filter_pushdown=true;
|
It would be great if select count() could be optimized in the mysql extension if the table has a primary key. e.g.
|
thbley
changed the title
Performance for selecting from primary key
Performance for select count() for tables with primary key
Nov 15, 2023
thbley
changed the title
Performance for select count() for tables with primary key
[Feature] Optimize performance for select count() for tables with primary key
Nov 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happens?
I tested duckdb v0.9.2 3c695d7ba9 with latest
linux_amd64_gcc4-extensions (https://github.com/duckdb/duckdb_mysql/actions/runs/6863109179
linux_amd64_gcc4-extensions) and mysql 8.0.35.
Currently performance in duckdb is lower compared to mysql client. Query results are correct, utf8mb4 works!
I tested:
with mysql client:
It would be great if performance could be optimized a bit for primary key selects!
Copying data from mysql to duckdb was very fast, much faster than copying inside of mysql!
To Reproduce
Create a table with 3 columns (int, varchar, datetime) and fill it with 1m rows.
Execute queries to select from primary key and run a count(*).
OS:
Ubuntu 22.04.3
MySQL Version:
8.0.35
DuckDB Version:
0.9.2
DuckDB Client:
cli
Full Name:
Thomas Bley
Affiliation:
myself
Have you tried this on the latest
main
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: