弱弱的问一句,FASTINSERT 和ADDBATCH那个更快?
问答
问一句,NUTZ 的FASTINSERT 和ADDBATCH那个更快?
标签:
无
17 回复
我现在就采用的SQLS 的ADDBATCH, dao.execute(sqls),因为从一张表搜索需修改的记录都是同一个字段,每个需修改的数值都不一样,结果有16000多条,发现好慢的,这个中间是不是有什么办法优化加快?
开始报了一个这样的错误,
21-Sep-2018 10:09:59.538 严重 [http-nio-8990-exec-18] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/wxthjava] threw exception
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:478)
at org.nutz.mvc.view.HttpEnhanceResponse.render(HttpEnhanceResponse.java:221)
at org.nutz.mvc.view.HttpStatusView.render(HttpStatusView.java:103)
at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
at org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:30)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:49)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1156)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
但报错后,我发现SQL数据库仍然在持续UPDATE,过了很久,我的程序扔出了一个错误,没有具体的文字
18-09-21 10:38:36.110 DEBUG [http-nio-8990-exec-18] update OLTVLAN.dbo.ztevlan set newc_vid=? where id=?
| 1 | 2 |
|----------|--------|
| 213 | 212689 |
| 216 | 213079 |
| 225 | 211736 |
| 205 | 213692 |
| 229 | 213706 |
| 213 | 211706 |
| 214 | 213759 |
| 221 | 212092 |
| 3003 | 212347 |
| 204 | 211712 |
-- Only display first 10 lines , don't show the remaining record(count=16851)
For example:> "update OLTVLAN.dbo.ztevlan set newc_vid='213 ' where id=212689"
添加回复
请先登陆