PC Review


Reply
Thread Tools Rate Thread

DataTable search performance

 
 
Larry Smith
Guest
Posts: n/a
 
      3rd Jan 2007
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.


 
Reply With Quote
 
 
 
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      3rd Jan 2007
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:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Larry Smith
Guest
Posts: n/a
 
      3rd Jan 2007
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataTable Performance Brian Gideon Microsoft ADO .NET 1 11th Jul 2007 04:10 PM
DataTable Performance Brian Gideon Microsoft Dot NET 1 11th Jul 2007 04:10 PM
DataTable search performance Larry Smith Microsoft ADO .NET 2 3rd Jan 2007 07:30 PM
how to search a datatable-can I use sql on a vb2005 datatable? =?Utf-8?B?UmljaA==?= Microsoft VB .NET 4 29th Jun 2006 07:51 AM
DataTable performance pinhead Microsoft ADO .NET 4 3rd Apr 2006 02:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:20 PM.