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 2020/09/21 01:49:41 UTC

[GitHub] [shardingsphere] wuqiaowu commented on issue #3681: tomcat start slowly with default datasource setting

wuqiaowu commented on issue #3681:
URL: https://github.com/apache/shardingsphere/issues/3681#issuecomment-695869268


   > @wuqiaowu Could you paste your configuration?
   
   In my cases, I only need table sharding (no database sharding).
   
   ```
   <sharding:data-source id="shardingDataSource">
       <sharding:sharding-rule data-source-names="ds_master0, ds_master0_slave0" default-database-strategy-ref="noneShardingStrategy">
           <sharding:master-slave-rules>
               <sharding:master-slave-rule id="ds_ms0" master-data-source-name="ds_master0"
                                               slave-data-source-names="ds_master0_slave0" strategy-ref="randomStrategy"/>
               <!--   add another rule to skip "TableMetaDataInitializer.loadDefaultTables"’s executing  -->
               <sharding:master-slave-rule id="ds_ms1" master-data-source-name="ds_master0"
                                               slave-data-source-names="ds_master0_slave0" strategy-ref="randomStrategy"/>
           </sharding:master-slave-rules>
           <sharding:table-rules>
               <!--   use ds_ms0 explicitly -->
               <sharding:table-rule logic-table="table_a"
                                        actual-data-nodes="ds_ms0.table_a_$->{0..63}"
                                        table-strategy-ref="xxxxTableAStrategy"/>
               <sharding:table-rule logic-table="table_b"
                                        actual-data-nodes="ds_ms0.table_b_$->{['2020']}${['01','02','03','04','05','06','07','08','09','10','11','12']}"
                                        table-strategy-ref="xxxxTableBStrategy"/>
           </sharding:table-rules>
       </sharding:sharding-rule>
   </sharding:data-source>
   ```


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