I have a report that needs to be generated in large quantities and sent to clients, so performance is of utmost necessity.
I've realized by monitoring SQL Server Profiler that all the available parameter values are queried twice, causing a few milliseconds of time wasted.
This however is not as serious as the fact that the main datasource queries are run twice as well. These cause quite a performance hit when generating reports.
After some investigation it seems that one of the tables referencing the datasource in the report is what is causing the repeat query. I find this strange since none of the subreports that use the same datasource cause the same behaviour.
The datasource value of the table is set to my maindatasource and no additional calculation is done on the data. The table literally just displays field values directly from the datasource
Why is my database getting hit more than once to retrieve exactly the same data?
The datasource is of type Telerik.Reporting.ObjectDataSource and I'm using 2015 Q3