Skip to content

Conversation

zhyayun
Copy link

@zhyayun zhyayun commented May 30, 2025

https://issues.apache.org/jira/browse/FLINK-37855
MySqlSchemaUtils#listTables and TableDiscoveryUtils#listTables is called to get the table names of all tables that need to be processed, However, in scenarios involving many databases and tables, this method call will require querying the database many times, resulting in a long processing time.
The optimization idea is to use mysql's metadata information, a connection to get all the library table information.

@lvyanquan
Copy link
Contributor

I think the key point is reusing the connection, instead of changing the query sql.
So passing Connection to listTables() method will be better.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 60 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants