huangpang opened a new issue #2406: select Range determination of dynamic tables
URL: https://github.com/apache/incubator-shardingsphere/issues/2406
 
 
   ## Question
   
   How about selecting tables based on fragmented columns instead of querying 
all tables?
   
   
   Depending on the configuration, it can insert into the specified table 
according to the fragmentation rules correctly when inserting.
   
   But not when querying. Instead, all tables are queried (with fragmentation 
conditions in the query).
   
   Example: 
   `select * from XX t where t. kssj >='20190501'and t. kssj <='20190701'`
   
   
   Because we have a large amount of data, we are going to divide the data 
according to the year and month, for example, 201905, 201906.
   
   We may create dozens of tables at a time.
   
   I don't know if sharding supports this requirement.
   If not, can you tell me how to customize the implementation?
   Thank you
   
   version:
   spring boot: v2.1.3.RELEASE
   
   ```
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
               <!--<artifactId>sharding-jdbc-core</artifactId>-->
               <version>4.0.0-RC1</version>
           </dependency>
   ```
   
   config:
   
   ```
           xx:
             actual-data-nodes: gayyptv2.xx$->{201901..201912}
             table-strategy:
               inline:
                 sharding-column: KSSJ
                 algorithm-expression: xx$->{KSSJ.format('yyyyMM')}
   ```
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to