dengjin001 edited a comment on issue #12311:
URL: 
https://github.com/apache/shardingsphere/issues/12311#issuecomment-916040441


   > Hi @dengjin001
   > Please provide more information:
   > 
   > * ShardingSphere-JDBC or ShardingSphere-Proxy?
           ShardingSphere-JDBC
   > * which vision do you use?
         5.0.0-beta
   > * what's your sharding configuration?
   
       sharding:
           tables:
             asset_balance_detail:
               actual-data-nodes: master.asset_balance_detail_$->{0..4}
               table-strategy:
                 standard:
                   sharding-column: user_id
                   sharding-algorithm-name: balance-line
             asset_ticket_detail:
               actual-data-nodes: master.asset_ticket_detail_$->{0..4}
               table-strategy:
                 standard:
                   sharding-column: user_id
                   sharding-algorithm-name: ticket-line
             asset_expense_detail:
               actual-data-nodes: master.asset_expense_detail_$->{0..4}
               table-strategy:
                 standard:
                   sharding-column: user_id
                   sharding-algorithm-name: expense-line
           binding-tables:
             - asset_balance_detail
             - asset_ticket_detail
             - asset_expense_detail
   
           keyGenerators:
             snowflake:
               type: SNOWFLAKE
               props:
                 worker-id: 123
           shardingAlgorithms:
             balance-line:
               type: INLINE
               props:
                 algorithm-expression: 
asset_balance_detail_$->{user_id.toBigInteger() % 5}
             ticket-line:
               type: INLINE
               props:
                 algorithm-expression: 
asset_ticket_detail_$->{user_id.toBigInteger() % 5}
             expense-line:
               type: INLINE
               props:
                 algorithm-expression: 
asset_expense_detail_$->{user_id.toBigInteger() % 5}
   > * what are the `Logic SQL` and `Actual SQL`?  Set `props.sql-show` to 
`true` to print them.
    ShardingSphere-SQL -Logic SQL: SELECT * FROM asset_balance_detail LIMIT 1
    ShardingSphere-SQL -SQLStatement: 
MySQLSelectStatement(limit=Optional[org.apache.shardingsphere.sql.parser.sql.common.segment.dml.pagination.limit.LimitSegment@3ce8b0d3],
 lock=Optional.empty, window=Optional.empty)  
   ShardingSphere-SQL -Actual SQL: master ::: SELECT * FROM 
asset_balance_detail_0 ORDER BY balance_detail_id ASC  LIMIT 1
   ShardingSphere-SQL -Actual SQL: master ::: SELECT * FROM 
asset_balance_detail_1 ORDER BY balance_detail_id ASC  LIMIT 1
    ShardingSphere-SQL -Actual SQL: master ::: SELECT * FROM 
asset_balance_detail_2 ORDER BY balance_detail_id ASC  LIMIT 1
   ShardingSphere-SQL -Actual SQL: master ::: SELECT * FROM 
asset_balance_detail_3 ORDER BY balance_detail_id ASC  LIMIT 1
   ShardingSphere-SQL -Actual SQL: master ::: SELECT * FROM 
asset_balance_detail_4 ORDER BY balance_detail_id ASC  LIMIT 1
       
   


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