Dani Dani - 1 year ago 39
C# Question

Which is faster: filtering a DataSet in-memory or returning a result set from SQl Server?

been up for 33 hours so forgive me if this seems trivial, I'm fascinated though.

I'm working on a pretty large table, (800k records and climbing) and I'd like to filter said table. The thing is, the table is stored in SQL Server. So, I was wondering, would a

SELECT * FROM table WHERE condition1=true
query be faster than loading the table to a typed DataSet and using DataRow.Find() then sending all those to another DataTable?
I'm guessing yes but I'll post anyway

Answer Source

As long as your SQL server is not paging because of RAM starvation the SQL Server should always be faster than loading the whole table via network and then filtering locally...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download