Skip to content

high latency for shardingsphere-jdbc initializing schema metadata in Single table rule #35500

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

Open
BourneD opened this issue May 24, 2025 · 1 comment

Comments

@BourneD
Copy link

BourneD commented May 24, 2025

version: shardingsphere-jdbc-5.5.2
we have about 4500 tables in our database. and the rule configuration is as below. there are no other rules except the SINGLE one. The initialization latency is about 4 minutes.

rules:
  - !SINGLE
    tables:
      - "ds0.restful_message_b_table"
    defaultDataSource: ds0

I analyzed the initialization procedure and found it is blocked in org.apache.shardingsphere.mode.metadata.persist.service.metadata.table.TableMetaDataPersistService::persist.
Can we optimize the persist method by parallel execution.

@linghengqian
Copy link
Member

Can we optimize the persist method by parallel execution.

  • It sounds like you want to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants