cherrishccl opened a new issue, #20945:
URL: https://github.com/apache/shardingsphere/issues/20945

   springboot2.4.5, mybatis-plus3.4.1, 
shardingsphere-jdbc-core-spring-boot-starter5.1.2
   单库,20 张表,其中 1 张表分表
   11 代 I7, 16G 内存
   未分表前启动很快,10s 左右,分表后平均时间 6 分多钟
   ```
   spring:
     shardingsphere:
       datasource:
         ds:
           driver-class-name: com.mysql.cj.jdbc.Driver
           jdbc-url: 
jdbc:mysql://localhost:3306/test?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
           password: 123456
           type: com.zaxxer.hikari.HikariDataSource
           username: root
           validation-timeout: 5000
           connection-timeout: 30000
           max-lifetime: 1800000
           maximum-pool-size: 20
           minimum-idle: 5
           idle-timeout: 600000
           auto-commit: true
           connection-test-query: SELECT 1
           pool-name: ${spring.application.name}-ds
         names: ds
       mode:
         type: Memory
       rules:
         sharding:
           key-generators:
             snowflake:
               type: SNOWFLAKE
           sharding-algorithms:
             local-date-time-inline:
               props:
                 strategy: standard
                 algorithmClassName: 
com.test.sharding.CustomLocalDateTimeStrategyShardingAlgorithm
               type: CLASS_BASED
           tables:
             test_bigdata_his:
               actual-data-nodes: ds.test_bigdata_his_202$->{201..912} # 按月分表
               key-generate-strategy:
                 column: id
                 key-generator-name: snowflake
               table-strategy:
                 standard:
                   sharding-algorithm-name: local-date-time-inline
                   sharding-column: data_time
       props:
         sql-show: true
         max:
           connections:
             size:
               per:
                 query: 50
   ```


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

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to