dongoewang commented on issue #30600:
URL: 
https://github.com/apache/shardingsphere/issues/30600#issuecomment-2021950378

   
![p2](https://github.com/apache/shardingsphere/assets/9483828/25dbde7a-9f18-4c1f-b406-642fa3655aef)
   
![p3](https://github.com/apache/shardingsphere/assets/9483828/3339ca4c-1dd3-4dd8-8ee7-ce0d487f6cb4)
   
   
   > I don't quite understand what your question is. Does your original SQL 
contain two separate SQL statements? Like this ?
   > 
   > ```sql
   > update kq_attendance_daily
   > SET attendance_plan_id = ?,
   > plan_type = ?
   > where id = ?
   > and attendance_date = ?
   > ;
   > update kq_attendance_daily
   > SET attendance_plan_id = ?,
   > plan_type = ?
   > where id = ?
   > and attendance_date = ?
   > ```
   > 
   > In ShardingSphere, parsing of the SQL for a single sentence stops when 
encountering a semicolon. If you want to rewrite the above sentence into normal 
form, please split it into two SQL statements.
   thanks for reply。when sql is splitted to two sql sentences,performance 
efficience is bad.jdk surports multile update sentence to improve efficience.
   project's orginal sql is following  (mybatis surports grammer) 
       '<update id="updateList" parameterType="java.util.List"> '
            '<foreach collection="list" item="item" index="index" open="" 
close="" separator=";"> '
              '  update kq_attendance_daily '
                '<set> '
                  '  attendance_plan_id = #{item.attendancePlanId}, '
                    'plan_type = #{item.planType} '
                '</set> '
                'where id = #{item.id} '
                '<if test="item.attendanceDate != null"> '
                  '  and attendance_date = #{item.attendanceDate} '
                '</if> '
            '</foreach> '
       </update>
   


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