473,549 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataTable search performance

Hi there,

Can anyone comment on the performance issues of "DataTable.Sele ct()" vs
"DataView.Find( )" (or "DataView.FindR ows()"). 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.Sele ct()" 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 "UniqueConstrai nt" 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.Sele ct()" 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.
Jan 3 '07 #1
2 4384
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@_nospa m.comwrote in message
news:uZ******** ******@TK2MSFTN GP02.phx.gbl...
Hi there,

Can anyone comment on the performance issues of "DataTable.Sele ct()" vs
"DataView.Find( )" (or "DataView.FindR ows()"). 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.Sele ct()" 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 "UniqueConstrai nt" 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.Sele ct()" 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.

Jan 3 '07 #2
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.
Jan 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8091
by: Luc | last post by:
I am using Visual Studio 2003 and am getting lousy performance after using a datatable select and then trying to assign a value to a column of the row that was found: DataTable dt = new DataTable(); dt.Columns.Add("Number", System.Type.GetType("System.Int32")); dt.Columns.Add("Value", System.Type.GetType("System.Double")); for(int...
6
1746
by: Mountain Bikn' Guy | last post by:
When one gets a row from a database (ie, a DataTable), the row contains a typed value in each column. How is this typically implemented behind scenes. I want to build this functionality myself. The reason I want to do this is because I need an in-memory table without any of the overhead of a DataSet or DataTable. Thanks!
9
1705
by: VMI | last post by:
We have this huge application that's based on storing tons of data on a dataTable. The only problem we're having is that storing LOTS of data (1 million records) into a datatable will slow down the system since all this data will be stored in memory. The performance is really affected with this. Since we don't really want to redesign...
3
2496
by: Bob | last post by:
I have a name-value pair type of data that I need to search against. It's to determine what menu item to highlight given the asp.net page name. So the list has all my page names (unique) and the corresponding menu IDs. Some pages have the same menu IDs. One every page load, I want to check the name, and get the menu ID so the menu can be...
2
2647
by: pagates | last post by:
Hi All, I have a DataTable in a Windows Forms project that I would like to use a Select statement. The problem is, I'd like to be able to do wildcard searches (including single charcater searches). What are my alternatives? I'd rather not have to go back to the database, unless that is the best way. The DataTable was a performance...
4
7675
by: Brett Romero | last post by:
I fill a DataTable with search results, which take a very long time if I first clear it. The values come from an object and I map them into the corresponding table columns. I may have 65000 results. I iterate through them, create a new row, fill it, and add it to the DataTable for each interation. This works fine on the first search. ...
4
5996
by: Rich | last post by:
Hello, I need to store various values that I will need to look up later on. I have been using hashtables and arraylists. But I can only store 2 items per row in a hashtable - key, value, and only 1 item in an arraylist. Or, I could create a class with various members and store that in a collection, or a structure, ... I was thinking,...
1
29971
by: Dave | last post by:
Hello, What is the best way (performance wise) to search for a row in a table? Let say I have a column named "col1" and what to get the row that the value of "col1" is "It is me"... I can set this column as the primary key to use the find method if it worths it. So my options are: 1- using the DataTable.Select method and provide a criteria...
5
5884
by: jehugaleahsa | last post by:
Hello: What is the point of using a DataTable in ASP .NET? We are unsure how you can use them without 1) rebuilding them every postback, or 2) taking up precious memory. We are not sure how to store a DataTable in any other way outside of our servers. In doing so, we leave ourselves open to large memory requirements. Furthermore, most web...
0
7548
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7472
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7743
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3499
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.