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 2021/02/19 02:46:07 UTC

[GitHub] [shardingsphere] LucienDon opened a new issue #9431: 当我使用oracle 数据库并与 sharding-jdbc-spring-boot-starter 和 spring-boot 整合时,项目启动非常慢

LucienDon opened a new issue #9431:
URL: https://github.com/apache/shardingsphere/issues/9431


   使用版本为4.1.1, oracle 一共有60张表,只进行了分表,我发现spring-boot 启动时, sharding-jdbc 会检索 oracle 元数据(metadata),与分表策略进行对比,这一过程非常慢(数据越多,启动越慢),  所以我想知道如何关闭检索metadata这一过程
   我的spring-boot 配置如下
   ```
   # sharding jdbc 配置
   spring:
     shardingsphere:
       datasource:
         names: ds0
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           url: jdbc:oracle:thin:@xxxx:1521/OSSDB
           username: xxx
           password: xxx
           driver-class-name: oracle.jdbc.OracleDriver
       sharding:
         tables:
           patient:
             actual-data-nodes: ds0.PATIENT_$->{0..4}
             table-strategy:
               standard:
                 precise-algorithm-class-name: djx.migratedata.config.strategy.PreciseAlgorithmForPatient
                 sharding-column: PK
           exam:
             actual-data-nodes: ds0.EXAM_$->{0..4}
             table-strategy:
               complex:
                 algorithm-class-name: djx.migratedata.config.strategy.ComplexAlgorithmForExam
                 sharding-columns: HOSPITAL_ID,ACCESS_NUMBER
           study:
             actual-data-nodes: ds0.STUDY_$->{0..4}
             table-strategy:
               standard:
                 precise-algorithm-class-name: djx.migratedata.config.strategy.PreciseAlgorithmForStudy
                 sharding-column: STUDY_UID
           series:
             actual-data-nodes: ds0.SERIES_$->{0..4}
             table-strategy:
               standard:
                 precise-algorithm-class-name: djx.migratedata.config.strategy.PreciseAlgorithmForStudy
                 sharding-column: STUDY_UID
           inst:
             actual-data-nodes: ds0.INST_$->{0..9}
             table-strategy:
               standard:
                 precise-algorithm-class-name: djx.migratedata.config.strategy.PreciseAlgorithmForStudy
                 sharding-column: STUDY_UID
           files:
             actual-data-nodes: ds0.FILES_$->{0..9}
             table-strategy:
               standard:
                 precise-algorithm-class-name: djx.migratedata.config.strategy.PreciseAlgorithmForStudy
                 sharding-column: STUDY_UID
   
       props:
         check:
           table:
             metadata:
               enabled: false
   ```


----------------------------------------------------------------
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



[GitHub] [shardingsphere] menghaoranss commented on issue #9431: 当我使用oracle 数据库并与 sharding-jdbc-spring-boot-starter 和 spring-boot 整合时,项目启动非常慢

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #9431:
URL: https://github.com/apache/shardingsphere/issues/9431#issuecomment-781876561


   @LucienDon For english only.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] LucienDon commented on issue #9431: 当我使用oracle 数据库并与 sharding-jdbc-spring-boot-starter 和 spring-boot 整合时,项目启动非常慢

Posted by GitBox <gi...@apache.org>.
LucienDon commented on issue #9431:
URL: https://github.com/apache/shardingsphere/issues/9431#issuecomment-781778444


   ![图片](https://user-images.githubusercontent.com/21983909/108450859-cfb4d280-72a0-11eb-9a7e-dab9f28c7c0b.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



[GitHub] [shardingsphere] menghaoranss closed issue #9431: 当我使用oracle 数据库并与 sharding-jdbc-spring-boot-starter 和 spring-boot 整合时,项目启动非常慢

Posted by GitBox <gi...@apache.org>.
menghaoranss closed issue #9431:
URL: https://github.com/apache/shardingsphere/issues/9431


   


----------------------------------------------------------------
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