Slow by code
Posted: Thu Apr 23, 2020 5:33 pm
				
				Hello,
I have a query with groupby and sum, this query return 60.000 record.
If I execute query by sql server editor, the execute time is 1 second
If I execute query by stimulsoft designer the execute time is 1 second
When I call the report by my site the execute time is more 15 second and sometime I have an error memory exception.
This is my code for open Dashboard:
Help me
			I have a query with groupby and sum, this query return 60.000 record.
If I execute query by sql server editor, the execute time is 1 second
If I execute query by stimulsoft designer the execute time is 1 second
When I call the report by my site the execute time is more 15 second and sometime I have an error memory exception.
This is my code for open Dashboard:
Code: Select all
public IActionResult Viewerevent()
        {
            return StiNetCoreViewer.ViewerEventResult(this);
        }
        public IActionResult GetReport()
        {
            StiReport report = new StiReport();
            StiSqlDatabase sqlDB = new StiSqlDatabase();
            report.Load(StiNetCoreHelper.MapPath(this, "Report/repname.mrt"));            
            sqlDB = (StiSqlDatabase)report.Dictionary.Databases["MS SQL"];
            sqlDB.ConnectionString = AppSettings.DbConnection;
            report.Render();
            return StiNetCoreViewer.GetReportResult(this, report);
        }