I have a large dataset and datagrid on my asp.net page. I am going to make it so the user can filter the original dataset. What is the best way? Should I use linq to filter the dataset or continue to use sql or is there a better way using vb.net with asp.net.
Share
I think the answer is as allways… “It depends”
You said you are talking about a “large dataset”.
If it is really large, then you should not show it to the user. You should also consider that storing it in IIS can decrease performance. You want a small and fast page. So I think its not good to send more then 50 records per page to the user (It allways depends what a record is)
You should consider creating some SQL that will allow you to do some paging in your results, and only transmit those. If you want to try to sort it out in code, then you might end up with “lots” of data on your lient. And the main purpose of a sql server is to sort and store data. So let it do his job. You also have to consider invalidating any data that you cache, which can be a challengs all by itself. Take a look at the nice LINQ functions like Skip(30).Take(10)…
On the other hand, if you have some that that is static, then you might gain from cashing it on the client, or a webservice.