Slow by code

Stimulsoft Dashboards.WEB discussion
Post Reply
luigi.arena
Posts: 36
Joined: Thu Feb 12, 2015 12:49 am

Slow by code

Post by luigi.arena »

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:

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);
        }
Help me
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Slow by code

Post by Lech Kulikowski »

Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.
luigi.arena
Posts: 36
Joined: Thu Feb 12, 2015 12:49 am

Re: Slow by code

Post by luigi.arena »

Sorry how do I send 40gb of Database?
Or how do I send you a table with 50,000 records?
luigi.arena
Posts: 36
Joined: Thu Feb 12, 2015 12:49 am

Re: Slow by code

Post by luigi.arena »

Can you explain to me the best way to visualize a table with 50,000 records?
I tried to set a Select Top (1000) but then when I use the filters in the dashboard, the filter is applied only to those 1000 records and does not reload them from the database.
How can I do ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Slow by code

Post by HighAley »

Hello, Luigi.

Our engine need to get all data.
You could use parameters to filter data and get necessary data only.

Our engine needs some time to process data so 15 seconds in not so long.

Please, use the next code to create the report instance:
var report = StiReport.CreateNewDashboard();

You should not call the Render() method for the dashboards.

Please, let us know if you still need our help.

Thank you.
Post Reply