This question is locked. New answers and comments are not allowed.
I have a grid defined similar to the below snippet, with aggregates, paging, and grouping enabled. I have approximately 30 columns worth of numeric data, which when grouped, must display totals in the footer. It may be worth mentioning that we are using the Entity Framework and Linq to Entities (however, this should be irrelevant), and Telerik MVC Extensions 2012.1.214.
When bound, a total of 3 SELECT statements are executed:
Surely, this second SELECT should never be executed? In my situation we are often paging upwards of 800,000 records - pulling all of these values into memory is causing a severe performance issue.
Am I perhaps missing something trivial, or is this a bug?
When bound, a total of 3 SELECT statements are executed:
- The first, retrieving a count of all matching records
- The second, retrieving ALL matching records (regardless of page size), along with the corresponding aggregated values
- The third, retrieving the top 10 (page size) matching records along with along with the corresponding aggregated values
Surely, this second SELECT should never be executed? In my situation we are often paging upwards of 800,000 records - pulling all of these values into memory is causing a severe performance issue.
Am I perhaps missing something trivial, or is this a bug?
@(Html.Telerik().Grid<MyObject>() .Columns(columns => { columns.Bound(i => i.PropertyOne) .Aggregate(aggregates => aggregates.Sum()) .ClientGroupFooterTemplate("<#= Sum #>"); columns.Bound(i => i.PropertyTwo) .Aggregate(aggregates => aggregates.Sum()) .ClientGroupFooterTemplate("<#= Sum #>"); /*-- etc. --*/ }) .DataBinding(dataBinding => dataBinding.Ajax().Select("MySelect", "MyController")) .Groupable(groupable => groupable.Enabled(true)))