BUG --性能优化-产品UPC 查询 及其慢 消耗大量资源
[步骤]
[11:24:10] -------------------------------------------------------------
CODE:N11241028
Error:21_596_1_-2146232060
SQL: SELECT top 500 [ID],[CustomerID],[UPC],[IsUsed],[UseTime],[Memo],[OrderSourceIDs],[OperationAdminID],[OperationAdminName],[IsEbayUsed],[IsCdUsed],[CdUseTime],[IsWishUsed],[LockGuid],[AddTime],[IsWalmartUsed],[IsMercadolibreUsed],[IsAllegroUsed],[IsNeweggUsed],[IsRealdeUsed],[IsKoganUsed],[IsJoybuyUsed],[IsFruugoUsed],[EbayUseTime],[WishUseTime],[WalmartUseTime],[MercadolibreUseTime],[AllegroUseTime],[NeweggUseTime],[RealdeUseTime],[KoganUseTime],[JoybuyUseTime],[FruugoUseTime],[IsTikTokUsed],[TikTokUseTime] FROM RB_Product_UPC (nolock) where AddTime >= '2019-12-31' and CustomerID = 1 and ID>0 and ISNULL(IsMercadolibreUsed,0) = 0 ORDER BY ID ASC
PARAMS:
MESSAGE:Cannot continue the execution because the session is in the kill state.
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryCloseInternal(Boolean closeReader)
在 System.Data.SqlClient.SqlDataReader.Close()
在 System.Data.Common.DbDataReader.Dispose(Boolean disposing)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
在 RB.DALExtend.RB_Product_UPCExtend.LockExportList(List`1 orderSourceTypes, Int32 customerID, Int32 pageSize, Int32 maxId)
在 PandaBuy.ERP.Web.IrobotBox.Order.ProductUPCBatchDownload.UpdateProductUPC(Int32 Quantity, List`1 orderSourceTypes, Int32 customerID, String lockGuid)
在 PandaBuy.ERP.Web.IrobotBox.Order.ProductUPCBatchDownload.Save()
在 PandaBuy.ERP.Web.IrobotBox.Order.ProductUPCBatchDownload.Page_Load(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest()
在 System.Web.UI.Page.ProcessRequest(HttpContext context)
在 ASP.irobotbox_order_productupcbatchdownload_aspx.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
-------------------------------------------------------------
[结果]
[期望]
清理 或者修改 业务 提升查询效率