[
https://issues.apache.org/jira/browse/IOTDB-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17322034#comment-17322034
]
Haonan Hou commented on IOTDB-1304:
-----------------------------------
Hi, I have found out the reason....
After statement.executeBatch(), we need to call statement.clearBatch() method
manually.
Therefore, we need to consider clear batch automatically after executeBatch.
> Insert by JDBC is slower as time goes by
> ----------------------------------------
>
> Key: IOTDB-1304
> URL: https://issues.apache.org/jira/browse/IOTDB-1304
> Project: Apache IoTDB
> Issue Type: Improvement
> Reporter: Haonan Hou
> Priority: Major
> Attachments: JDBCExample copy.txt, TestEntity copy.txt
>
>
> Inserting by jdbc become slower as time goes by.
> At the beginning of the client running.
> ...
> Create statement cost :2
> Insert 360 cost :63
> Create statement cost :0
> Insert 400 cost :34
> Create statement cost :0
> Insert 440 cost :29
> Create statement cost :0
> Insert 480 cost :26
> ...
>
> After some time then
> ...
> Create statement cost :0
> Insert 48360 cost :863
> Create statement cost :0
> Insert 48400 cost :779
> Create statement cost :0
> Insert 48440 cost :766
> ...
>
>
> Here is the test code.
> [^TestEntity.java]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)