Skip to content
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

feat(query): optimize show tables with pushdown filter only contain eq database #11490

Merged
merged 3 commits into from
May 17, 2023

Conversation

TCeason
Copy link
Collaborator

@TCeason TCeason commented May 17, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

optimize show tables with pushdown filter only contain eq database

Result

select count() from system.tables;
+---------+
| count() |
+---------+
|    4082 |
+---------+
1 row in set (0.509 sec)

MySQL [(none)]> show tables from a;
+-------------+
| tables_in_a |
+-------------+
| a           |
+-------------+
1 row in set (0.043 sec)

MySQL [(none)]> show tables from tpch;
+----------------+
| tables_in_tpch |
+----------------+
| customer       |
| lineitem       |
| nation         |
| orders         |
| part           |
| partsupp       |
| region         |
| supplier       |
+----------------+
8 rows in set (0.045 sec)

Closes #issue

@vercel
Copy link

vercel bot commented May 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
databend ⬜️ Ignored (Inspect) May 17, 2023 11:08am

@TCeason TCeason requested review from sundy-li and leiysky May 17, 2023 08:38
@TCeason
Copy link
Collaborator Author

TCeason commented May 17, 2023

cc @wubx

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label May 17, 2023
MySQL [(none)]> show tables from a;
+-------------+
| tables_in_a |
+-------------+
| a           |
+-------------+
1 row in set (0.043 sec)

MySQL [(none)]> show tables from tpch;
+----------------+
| tables_in_tpch |
+----------------+
| customer       |
| lineitem       |
| nation         |
| orders         |
| part           |
| partsupp       |
| region         |
| supplier       |
+----------------+
8 rows in set (0.045 sec)
@TCeason TCeason force-pushed the optimize_show_table branch from bc6f82f to d358085 Compare May 17, 2023 08:40
@TCeason TCeason force-pushed the optimize_show_table branch from 37e2bdd to 06fc05a Compare May 17, 2023 11:01
@BohuTANG BohuTANG merged commit 39c0747 into databendlabs:main May 17, 2023
andylokandy pushed a commit to andylokandy/databend that referenced this pull request Nov 27, 2023
…q database (databendlabs#11490)

* feat(query): optimize show tables with pushdown filter eq database

MySQL [(none)]> show tables from a;
+-------------+
| tables_in_a |
+-------------+
| a           |
+-------------+
1 row in set (0.043 sec)

MySQL [(none)]> show tables from tpch;
+----------------+
| tables_in_tpch |
+----------------+
| customer       |
| lineitem       |
| nation         |
| orders         |
| part           |
| partsupp       |
| region         |
| supplier       |
+----------------+
8 rows in set (0.045 sec)

* refactor find_eq_db_table to util::find_eq_filter

---------

Co-authored-by: sundyli <543950155@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants