DataTable.Select Method

C

csl

I have a DataTable that has 240000 rows in it. My DataTable.Select Method
for a particular filter gets me 840 out of 240000 rows. However, it takes
about 5 seconds to process. The DataTable has 6 columns. The datatype for
the columns are number(10), number(10), varchar2(2000), number(10),
number(10), number(10). \

How can I index (data values are not unique) the in-memory DataTable? How
can I speed up the filter process?

Thanks,
Chris
 
R

Robbe Morris [C# MVP]

That sounds about right for that many rows. You really
shouldn't load 240,000 rows into a single datatable
and then try to use the datatable like a full fledged database
to run queries against.

Think of all the memory you are taking up. Even if
your app only has one user at a time, this is still a lot.

You need to rerun your query and filter the resultset
down using the actual database.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/forumvbcode/post10017013.aspx
http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top