Note that there are some explanatory texts on larger screens.

plurals
  1. POPreparedStatement - executeBatch
    primarykey
    data
    text
    <p>I am using executeBatch for writing into database. <strong>Batch size is 50.</strong></p> <pre><code>long startt = System.currentTimeMillis(); da.writeAll(batchRaiseRecords); LoggerClient.writeError("DML write sendDML - " + (System.currentTimeMillis() - startt) + " - size - " + batchRaiseRecords.size(),""); </code></pre> <p>Now, this time taken by this operation varies from <em>0.2 to 6 seconds</em>. My doubt is why is this much variation?</p> <pre><code>Line 2246: DML write sendDML - 362555602 - size - 50, Line 3960: DML write sendDML - 609145666 - size - 50, Line 6034: DML write sendDML - 1398866678 - size - 50, Line 7676: DML write sendDML - 324071619 - size - 50, Line 9398: DML write sendDML - 492674501 - size - 50, Line 11180: DML write sendDML - 632663209 - size - 50, Line 14926: DML write sendDML - 6776384464 - size - 50, Line 16542: DML write sendDML - 384737523 - size - 50, Line 17896: DML write sendDML - 287436213 - size - 50, Line 18730: DML write sendDML - 206414079 - size - 50, Line 19548: DML write sendDML - 288492245 - size - 50, Line 20382: DML write sendDML - 310753856 - size - 50, Line 21212: DML write sendDML - 695180583 - size - 50, Line 22466: DML write sendDML - 232818139 - size - 50, Line 23360: DML write sendDML - 246089140 - size - 50, Line 24420: DML write sendDML - 192751420 - size - 50, </code></pre> <p>I tried this operation many a times, and results are almost similar.</p> <p>Why this much variation in same operation <strong>executeBatch()</strong>?</p> <p><strong>EDIT :</strong> DML is used for writing to MySql database. And there is only one client.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload