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

[GitHub] lalicw opened a new issue #1897: >= and <= support for range sharding

lalicw opened a new issue #1897: >= and <= support for range sharding
URL: https://github.com/apache/incubator-shardingsphere/issues/1897
 
 
   ## Feature Request
   
   assume we have a table t_order, we use monthly table sharding like:
   ```SQL
   t_order_2018_10
   t_order_2018_11
   t_order_2018_12
   t_order_2019_01
   ...
   ```
   
   if we want to using the range sharding, we need use the BETWEEN AND syntax.
   
   but it's difficulty to determine start time and end time sometimes, for example:
   ```SQL
   select * from t_order where username = 'xxx' and create_time >= '2018-12-10 10:00:00'
   ```
   
   it will be better if we can use range sharding algorithm to filter the table 
   ```SQL
   t_order_2018_10
   t_order_2018_11
   ```
   
   and this will also improve the performance for sharding jdbc
   
   ### Is your feature request related to a problem?
   no
   
   ### Describe the feature you would like.
   SQL like 
   ```SQL
   select * from t_order where create_time >= '2018-10-10 10:00:00'
   ```
   can be apply to the range sharding algorithm then we can decrease the available target names and target tables. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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