tags:

views:

49

answers:

2

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?

A: 

Use the DefaultView of the DataTable and set its .Filter property. Much faster than Select().

Joel Etherton
+1  A: 

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.

sestocker