作者:zmhua123_681 | 来源:互联网 | 2022-12-15 18:53
Ihaveacode,whichmanageArrayList<priceItem>anddirecteachitemintoMySQLusingprepare
I have a code, which manage ArrayList
and direct each item into MySQL using preparedStatement. I don't know how to boost speed of this code. I tried use .addBatch()
but it didn't help. Here's code.
我有一个代码,它管理ArrayList
并使用preparedStatement将每个项目指向MySQL。我不知道如何提高这段代码的速度。我尝试使用.addBatch()但它没有帮助。这是代码。
try {
cOnnection= DriverManager.getConnection(URL, USERNAME, PASSWORD);
preparetStmt = connection.prepareStatement(INSERT_NEW);
for (int i = 0; i
Help me to find way to increase speed of loading this statement. For 1500 items it's took above 2 min. I need to sent more than 150K items.
帮助我找到提高加载此声明的速度的方法。对于1500件物品,需要2分钟以上。我需要发送超过150K的物品。
1 个解决方案