Reputation: 5199
We are using the .NET DataSet
and DataTable
classes to filter data. But we have two tables with almost 596,814 records in one table and around 10,000 records in the other. DataSet filtering using DataTable.Select
is massively slow.
Are there any faster approaches?
Upvotes: 1
Views: 386
Reputation: 3532
Do your filtering at the database if possible, especially if it is a web app. If it is a client app, do as many optimizations as possible - but it is always going to be a little slow on a half million records. Make sure your app communicates that it is working to the user.
Upvotes: 1
Reputation: 37533
Use the DefaultView of the DataTable and set its .Filter property. Much faster than Select().
Upvotes: 0