473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DataTable search performance

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.
Jan 3 '07 #1
2 4372
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.comwrote in message
news:uZ**************@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.

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
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...
6
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...
9
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...
3
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...
2
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...
4
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...
4
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...
1
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.