2025-03-08 12:05:25.689 ERROR (Log4jFilter.java:152) - {conn-23655, pstmt-320635} execute error. WITH jfListTemp AS(select * from z_integral_record_201611 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 WITH(NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 WITH(NOLOCK) where is_del = 0 ) SELECT * FROM ( SELECT ROW_NUMBER() OVER (ORDER BY inr.record_time DESC) AS serialNum, inr.record_ID AS recordId, ISNULL(inr.mode,'') AS integralMode, ISNULL(inr.integral_num,0) AS integralNum, ISNULL(CONVERT(varchar(100), inr.record_time, 120),'') AS recordTime, ISNULL( ua.user_nick_name, ucr.app_user_name ) AS appUserName, ISNULL( ua.user_phone_number, ucr.user_phone_number ) AS appPhoneNum, ISNULL(ua.user_is_test, ucr.user_is_test) AS appIdentify, inr.app_user_ID as userId FROM jfListTemp inr LEFT JOIN user_app_info ua ON inr.app_user_ID=ua.user_ID LEFT JOIN user_cancel_record ucr ON ucr.app_user_ID= inr.app_user_ID WHERE inr.is_del !=1 GROUP BY inr.record_ID,inr.record_time,inr.mode,inr.integral_num,ua.user_nick_name,ua.user_phone_number,ua.user_is_test,inr.app_user_ID, ucr.app_user_name, ucr.user_phone_number, ucr.user_is_test ) temp WHERE temp.serialNum BETWEEN (0+1) AND (0/10+1)*10 com.microsoft.sqlserver.jdbc.SQLServerException: 查询超时。 at com.microsoft.sqlserver.jdbc.TDSCommand.checkForInterrupt(IOBuffer.java:5918) at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:70) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.(SQLServerResultSet.java:311) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1526) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3051) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3049) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3049) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167) at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) at com.sun.proxy.$Proxy148.execute(Unknown Source) at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63) at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) at com.github.pagehelper.SqlUtil._processPage(SqlUtil.java:401) at com.github.pagehelper.SqlUtil.processPage(SqlUtil.java:374) at com.github.pagehelper.PageHelper.intercept(PageHelper.java:255) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) at com.sun.proxy.$Proxy146.query(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434) at com.sun.proxy.$Proxy23.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231) at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) at com.sun.proxy.$Proxy62.selectIntegralFlowManageList(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy63.selectIntegralFlowManageList(Unknown Source) at ctr.crowdphoto.service.impl.IntegralServiceImpl.getIntegralFlowListByDataTable(IntegralServiceImpl.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy64.getIntegralFlowListByDataTable(Unknown Source) at ctr.crowdphoto.controller.ExchangeController.getIntegralFlowManageList(ExchangeController.java:146) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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:197) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) 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:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) 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:745) 2025-03-08 12:11:42.485 ERROR (StatFilter.java:478) - slow sql 283858 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2019-07-30","2025-03-08"] 2025-03-08 12:13:35.471 ERROR (StatFilter.java:478) - slow sql 452367 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2025-03-01","2025-03-08"] 2025-03-08 12:13:36.086 ERROR (StatFilter.java:478) - slow sql 451873 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2025-03-01","2025-03-08"] 2025-03-08 12:13:36.785 ERROR (StatFilter.java:478) - slow sql 452263 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2025-03-01","2025-03-08"] 2025-03-08 12:13:39.842 ERROR (StatFilter.java:478) - slow sql 455252 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2025-03-01","2025-03-08"] 2025-03-08 12:14:08.898 ERROR (StatFilter.java:478) - slow sql 498438 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2019-07-30","2025-03-08"] 2025-03-08 12:14:10.747 ERROR (StatFilter.java:478) - slow sql 493670 millis. WITH temp2 AS ( SELECT * FROM ( SELECT getDateList.singleDay, ROW_NUMBER() OVER (ORDER BY getDateList.singleDay DESC) AS serialNum FROM ( SELECT CONVERT (VARCHAR(100), dateadd(d, -number, ?),23) AS singleDay FROM master..spt_values WHERE type = 'p' ) getDateList WHERE getDateList.singleDay between ? and ? ) temp1 WHERE temp1.serialNum BETWEEN (0+1) AND (0/10+1)*10 ), jfListTemp AS(select * from z_integral_record_201611 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201612 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201701 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201702 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201703 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201704 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201705 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201706 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201707 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201708 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201709 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201710 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201711 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201712 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201801 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201802 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201803 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201804 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201805 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201806 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201807 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201808 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201809 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201810 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201811 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201812 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201901 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201902 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201903 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201904 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201905 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201906 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201907 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201908 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201909 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201910 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201911 (NOLOCK) where is_del = 0 union all select * from z_integral_record_201912 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202001 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202002 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202003 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202004 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202005 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202006 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202007 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202008 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202009 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202010 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202011 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202012 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202101 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202102 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202103 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202104 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202105 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202106 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202107 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202108 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202109 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202110 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202111 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202112 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202201 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202202 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202203 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202204 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202205 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202206 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202207 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202208 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202209 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202210 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202211 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202212 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202301 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202302 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202303 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202304 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202305 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202306 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202307 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202308 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202309 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202310 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202311 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202312 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202401 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202402 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202403 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202404 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202405 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202406 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202407 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202408 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202409 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202410 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202411 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202412 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202501 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202502 (NOLOCK) where is_del = 0 union all select * from z_integral_record_202503 (NOLOCK) where is_del = 0 ) SELECT temp.singleDay AS singleDay, ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and datediff(day, record_time, temp.singleDay) = 0), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE datediff(day, create_time, temp.singleDay) = 0), 0)- ISNULL((select SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and datediff(day, record_time, temp.singleDay) = 0), 0) AS GrantCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplyCount, ISNULL((select SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and datediff(day, commit_time, temp.singleDay) = 0), 0) AS ApplySucCount, ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND datediff(day, record_time, temp.singleDay) = 0), 0 ) AS CancelCount, ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(1,2,3,6,7) and record_time <= temp.singleDay), 0)+ ISNULL((SELECT SUM(integral_num) FROM questionnaire_integral_record WITH(NOLOCK) WHERE create_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(to_ex_integral) FROM exchange_app WITH(NOLOCK) WHERE ex_status = 2 and commit_time <= temp.singleDay), 0)- ISNULL((SELECT SUM(integral_num) FROM jfListTemp WHERE mode in(4) and web_user_ID like '%备案%' and record_time <= temp.singleDay), 0)- ISNULL((SELECT SUM( integral_num ) FROM jfListTemp WHERE mode = 10 AND record_time <= temp.singleDay), 0 ) AS SurplusCount from temp2 temp["2025-03-08","2019-07-30","2025-03-08"]