mssqlInsertStatement.addBatch();
count ++;
if(count % 10000 == 0) {
mssqlInsertStatement.executeLargeBatch();
mssqlInsertStatement.clearBatch();
mssqlConnection.commit();
1, 2 > log.debug("batch commit taken = " + count );
}
}
mssqlInsertStatement.executeLargeBatch();
mssqlInsertStatement.clearBatch();
3> log.debug(" ¡Ú batch insert total = " + count);
1> 2022-01-28 09:24:22 [main] [DEBUG] BatchForBilldata(writeWithCompileQueryInsert:351) -> batch commit taken = 340000
2> 2022-01-28 09:24:37 [main] [DEBUG] BatchForBilldata(writeWithCompileQueryInsert:351) -> batch commit taken = 350000
3> 2022-01-28 09:27:29 [main] [DEBUG] BatchForBilldata(writeWithCompileQueryInsert:360) -> ¡Ú batch insert total = 357755
ÀÚ¹Ù·Î batch ó¸® ÁßÀε¥ 1¹ø°ú 2¹ø »çÀÌ ½Ã°£Àº °ÅÀÇ Å« Â÷ÀÌ°¡ ¾ø´Âµ¥ resultset.next()¸¦ ºüÁ® ³ª¿À¸é¼ 2ºÐ Á¤µµ µô·¹ÀÌ°¡ »ý±â´Âµ¥
¿øÀÎÀ» ¸ð¸£°Ú¾î¿ä.
Å« ½Ã°£Àº ¾Æ´Ñµ¥ 30¸¸°Ç¾¿ Àüü 800¸¸°ÇÀ» µ¹·Á¾ß Çؼ ¼Óµµ°¡ Áß¿äÇÑ ºÎºÐÀ̶ó ±Ã±ÝÇÕ´Ï´Ù.
|
rs.next() ¸é HeapÀ̳ª N/W È®·üÀÌ ³ô±ä Çѵ¥ ÃßÁ¤À¸·Î Á¢±ÙÇÏ¸é ¹®Á¦¸¦ ÇØ°áÇϱ⠴õ ¾î·Á¿öÁý´Ï´Ù.
Áö¿¬±¸°£ stacktrace ¸¦ È®ÀÎÇÏ´Â°Ô Á¦ÀÏ Áß¿äÇÏ´Ï scouter °°Àº ¿ÀǼҽºµµ±¸¸¦ ¾²°Å³ª jstackÀ¸·Î È®ÀÎ ÇØ º¼ °ÍÀ» ±ÇÇÕ´Ï´Ù.
°¨»çÇÕ´Ï´Ù