PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
DataTable search performance
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
DataTable search performance
![]() |
DataTable search performance |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi there,
Can anyone comment on the performance issues of "DataTable.Select()" vs "DataView.Find()" (or "DataView.FindRows()"). I have to conduct repeated searches using the same index and I'm not sure which to rely on. From what I've read, "DataTable.Select()" doesn't rely on indexes so using a "DataView" would seem to be the obvious choice. However, that still requires the index be built each time I construct a new "DataView". Given that I already have a "UniqueConstraint" established on the multiple columns I need to search on, can anyone confirm whether this constraint actually results in a pre-built index behind the scenes. If so then I would think that "DataTable.Select()" would rely on this existing index after parsing the filter expression I pass to it. Can someone comment on this situation in general. Thanks very much. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hi
Why don't you simply try it in your environment, run the same search with each variant and keep a track of how much time each version takes. -- Ignacio Machin machin AT laceupsolutions com "Larry Smith" <no_spam@_nospam.com> wrote in message news:uZ30r70LHHA.4708@TK2MSFTNGP02.phx.gbl... > Hi there, > > Can anyone comment on the performance issues of "DataTable.Select()" vs > "DataView.Find()" (or "DataView.FindRows()"). I have to conduct repeated > searches using the same index and I'm not sure which to rely on. From what > I've read, "DataTable.Select()" doesn't rely on indexes so using a > "DataView" would seem to be the obvious choice. However, that still > requires the index be built each time I construct a new "DataView". Given > that I already have a "UniqueConstraint" established on the multiple > columns I need to search on, can anyone confirm whether this constraint > actually results in a pre-built index behind the scenes. If so then I > would think that "DataTable.Select()" would rely on this existing index > after parsing the filter expression I pass to it. Can someone comment on > this situation in general. Thanks very much. > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
> Why don't you simply try it in your environment, run the same search with
> each variant and keep a track of how much time each version takes. It's unreliable in the general case. Maybe one method works better depending on various factors but not others. I'm trying to pin down what these factors are for future use as well. Thanks though. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

