I have a table with over million records so that the query in LINQ is so slow.
Originally, my code in NeedDataSource event was
var query = (from prod in dldc.Products
select prod);
and I set
AllowPaging
="true"
AllowCustomPaging
="true"
AllowSorting
="True"
AllowMultiColumnSorting
="True"
and assign the result to RagGird.DataSource. Actually here is a quick sample, the result is not only from Products, it needs to join other tables, a lot of tables.
Then I got the the performance issue, it took me over 20 mins to show the results. So I am going to use CustomPaing to make the it easy and I put the below segment in NeedDataSource event:
var
query = (from prod in dldc.Products
select prod);
query.Skip(page * size).Take(size);
Anyway, the grid looks fine by using such paging instead of query all records from database. However, the filtering only filter the result over current page that is not what I exactly need.
What I need is to boost the performance up with both paging and filtering. Also, how do I make RagGrid filter the products over all the products, and also with paging?
Thanks in advance.