Bonnie,
When you get your answer please let me know what it is...
I suspect that with only a couple hundred records you'll find that there isn't "much" of a difference either way...
So the most flexible would probably be the filter...(that's just a guess)
With more records (Over 1,000), I suspect the select would be "significantly" faster (based on my experience in Visual FoxPro).
Rick
----------------------
>Hey gang,
>
>I haven't done any kind of benchmark testing, but I will if nobody has a definitive answer to this. I have a DataTable that could have a lot of Rows in it (ok, maybe not thousands, but at least it's possible to have a couple hundred). Anyway, I have a particular row that I'm searching for, based on a key column. I'm trying to determine the fastest, most efficient way to find that row.
>
>The three methods of doing that would be:
>
>1) create a DataView, set the RowFilter
>2) use the DataTable.Select() method
>3) iterate through every DataRow in the DataTable
>
>I think #3 is probably pretty slow. I'm more familiar with #1, using DataViews, and thought that might be faster, but I don't know how much "overhead" there is in defining the View to begin with. I've not used #2 at all yet, but it seems fairly straightforward. Again, I don't know what to expect in terms of overhead.
>
>Anyone compared these different methodologies?
>
>TIA,
>~~Bonnie
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only