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

           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core</artifactId>
               <version>5.4.1</version>
           </dependency>
   
--------------------------------------------------------------------------------
   rules:
     - !SINGLE
       tables:
         - "*.*"
     - !SHARDING
       tables:
         part_cmnt:
           actualDataNodes: ds_0.part_cmnt_${0..9}
           tableStrategy:
             standard:
               shardingColumn: part_fkid
               shardingAlgorithmName: t_cmnt_inline
   
       shardingAlgorithms:
         t_media_inline:
           type: INLINE
           props:
             algorithm-expression: part_cmnt_${part_fkid % 10}
   
----------------------------------------------------------------------------------------------------------------------------------
   
   ```
           SELECT out_cmnt.*, vote_bind_tab.*, vote_user_tab.*
           FROM
           (
               SELECT cmnt_tab.*, label vote_label
               FROM
               (
                   <!-- 基础.评论数据 -->
                   SELECT base_cmnt.* FROM part_cmnt base_cmnt
                   WHERE base_cmnt.part_fkid = #{partFkid,jdbcType=BIGINT}
                   AND base_cmnt.cmnt_del = 0
                   ORDER BY base_cmnt.cmnt_id DESC
                   LIMIT 1000
               ) cmnt_tab
               <!-- 评论.点赞数据 -->
               LEFT JOIN part_vote vote_bind_tab ON vote_bind_tab.bind_fkid = 
cmnt_tab.cmnt_id
               AND vote_bind_tab.part_fkid = #{partFkid,jdbcType=BIGINT}
               GROUP BY cmnt_tab.cmnt_id
           ) out_cmnt
                LEFT JOIN part_vote vote_user_tab ON vote_user_tab.bind_fkid = 
out_cmnt.cmnt_id
                AND vote_user_tab.user_id = #{userId,jdbcType=BIGINT}
                GROUP BY out_cmnt.cmnt_id
   ```
   part_cmnt ,  part_vote 都是分表, 我怎么才能手动指定数据表名, 如part_cmnt_1, 
当我这么指定时候就报错,说part_cmnt_1不存在,如果我不手动指定数据表名,就会执行M0-M9 * N0-N9 * X0-X9次查询。
   
   
   
   
   


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