HOME DOCUMENTATION DOWNLOADS

Row count doesn't show when filtering a large dataset

I have lazily loaded screen showing 45k records. When filtering by tag input column with the operator not equals, the data set gets filtered, but row count is not shown.

GetAggregations request, which is used for fetching row count, returns in the end following error:

{
   "ClassName":"System.Data.SqlClient.SqlException",
   "Message":"Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.",
   "Data":{
      "HelpLink.ProdName":"Microsoft SQL Server",
      "HelpLink.ProdVer":"12.00.2255",
      "HelpLink.EvtSrc":"MSSQLServer",
      "HelpLink.EvtID":"-2",
      "HelpLink.BaseHelpUrl":"http://go.microsoft.com/fwlink",
      "HelpLink.LinkId":"20476",
      "OriginalClientConnectionId":"197b0ba7-7301-4b16-acdd-80ae9b33139c",
      "RoutingDestination":"ffc145059b0f.tr13820.westeurope1-a.worker.database.windows.net,11029",
      "SqlError 1":"System.Data.SqlClient.SqlError: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."
   },
   "InnerException":{
      "ClassName":"System.ComponentModel.Win32Exception",
      "Message":"Unknown error 258",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":null,
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":null,
      "HResult":-2147467259,
      "Source":null,
      "WatsonBuckets":null,
      "NativeErrorCode":258
   },
   "HelpURL":null,
   "StackTraceString":"   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\n   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\n   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()\n   at System.Data.SqlClient.SqlDataReader.get_MetaData()\n   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)\n   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)\n   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)\n   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)\n   at Origam.DA.Service.AbstractSqlDataService.ExecuteDataReader(DataStructureQuery query, IPrincipal principal, String transactionId) in D:\\a\\1\\s\\origam-source\\Origam.DA.Service\\AbstractSqlDataService.cs:line 1617\n   at Origam.DA.Service.AbstractSqlDataService.ExecuteDataReaderInternal(DataStructureQuery query)+MoveNext() in D:\\a\\1\\s\\origam-source\\Origam.DA.Service\\AbstractSqlDataService.cs:line 1698\n   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()\n   at Origam.ServerCore.Controller.UIServiceController.ExtractAggregationList(IEnumerable`1 readerResult) in D:\\a\\1\\s\\origam-source\\Origam.ServerCore\\Controller\\UIServiceController.cs:line 629\n   at CSharpFunctionalExtensions.ResultExtensions.Bind[T,K,E](Result`2 result, Func`2 func)\n   at Origam.ServerCore.Controller.UIServiceController.<>c__DisplayClass34_0.<GetAggregations>b__0() in D:\\a\\1\\s\\origam-source\\Origam.ServerCore\\Controller\\UIServiceController.cs:line 342\n   at Origam.ServerCore.Controller.AbstractController.RunWithErrorHandler(Func`1 func) in D:\\a\\1\\s\\origam-source\\Origam.ServerCore\\Controller\\AbstractController.cs:line 120",
   "RemoteStackTraceString":null,
   "RemoteStackIndex":0,
   "ExceptionMethod":null,
   "HResult":-2146232060,
   "Source":"Core .Net SqlClient Data Provider",
   "WatsonBuckets":null,
   "Errors":null,
   "ClientConnectionId":"5279fd6a-a158-4312-a746-70dec4ed75b0"
}

Now the question is whether it is a problem of Origam implementation or the database model needs some adjustments.

The problem can be fixed by adding an index