You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/12/06 11:03:31 UTC

[GitHub] [incubator-shardingsphere] CatDogZ opened a new issue #3678: 用namespace配置的方式,添加默认数据源后,启动很慢

CatDogZ opened a new issue #3678: 用namespace配置的方式,添加默认数据源后,启动很慢
URL: https://github.com/apache/incubator-shardingsphere/issues/3678
 
 
   **shardingjdbc 4.0版本的**
   我用的spring命名空间的方式配置的。
   有个order表,我进行分表分库了。但是其他剩余的表,我第一个版本不打算拆分,还是全部放在原来的数据源里面(大概有几百张表)。发现添加了default-data-source-name 这个配置后,项目启动很慢,大概要好几分钟。 我就去查看了源码,发现TableMetaDataInitializer这个类下面load方法,加载默认数据源信息的时候,要花费很长的时间。虽然定位到了问题,但是不知道如何解决,请问有人知道如何解决吗?
   ![image](https://user-images.githubusercontent.com/31087808/70318380-dfdac080-185a-11ea-8ef9-2cd4064bf54f.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services