It is the parsing module cost so much time. You can update the
Sharding-JDBC to 4.1.0 or above to solve the problem.
Please refer to the release notes of 4.1.0:
https://github.com/apache/shardingsphere/releases/tag/4.1.0

--

Zhang Yonglun
Apache ShardingSphere


Terry Zhang <[email protected]> 于2020年8月4日周二 下午6:37写道:

> Hi, ShardingSphere community,
>
> &nbsp;
>
> We are using Sharding-Sphere 4.0.RC2 in our project for a long time.
> Recently, we are encountering a serious issue struggling us. When we try to
> insert 5K records one time into one table, it takes about 40 seconds.
> However, when the execution time is about 0.11 second according to MySQL
> Audit log.
>
> &nbsp;
>
> To figure our the root reason, we try to disable ShardingSphere and use
> native JDBC instead, the result is very positive. It is so quick to execute
> the same SQL. It is about 0.2s.
>
> &nbsp;
>
> Based on above findings, we think ShardingJDBC may cause it happen.
>
> &nbsp;
>
> To solve it, we are finding the possible solution. Here is our solution,
> as not all of MySQL tables need to use sharding feature. we have those
> non-sharding tables keep to use the native JDBC, not use ShardingJDBC. To
> implement it, we try to find the way to implement it according to the
> official document, unfortunately, we don’t find the best way. &nbsp;
>
> &nbsp;
>
> How to implement our solution? Alternatively, any other solution to
> resolve it?
>
> &nbsp;
>
> To help to understand it easily ,here is some information for the
> reference.
>
> &nbsp;
>
> --------The format of SQL DML like this------
>
> INSERT INTO tbl_orders (id,f2,f3,....) VALUES (1,xx,xx,...),
> (2,xx,xx,...), (3,xx,xx,...), ...,(5000,xx,xx,...).
>
> Please note, the table &nbsp;tbl_orders is a non-sharding table.
>
> &nbsp;
>
> ------ Java --------
>
> Java 1.8
>
> &nbsp;
>
> ----MySQL---
>
> MySQL 5.7
>
> &nbsp;
>
> --OS --
>
> CentOS 7.2
>
>
>
>
>
>
>
> Terry

Reply via email to