What's Faster: DataTable.Select or GetChildRows

  • Thread starter Thread starter Ryan K
  • Start date Start date
R

Ryan K

Hi,

I have a DataSet that contains a Master and a Child DataTable.

If I need to repeatedly get child DataRows from the child DataTable, what is
quickest?

Option A:
Use DataTable.Select.

Option B:
Use GetChildRows on a DataRow in the Master DataTable.
(And have the relationship defined of course)

First assuming both tables less than a few hundred rows. Would it effect it
if there were more? (Is it time consuming for the DS to maintain the
relationship with big tables?)


What if the tables are repeatedly cleared and populated thousands on times?
(I am worried the internal maintenance that a DataSet does to maintain the
indexes for a DataRelation would be time consuming.) With really small
rowcount I assume a For..Next loop works fastest?


Thanks in advance for any help,

Ryan
 
Ryan,

The filterend dataview with a sort in it set has showed in some tests to be
the fastest.

However don't worry to much about this kind of performance. One move of a
screen one inch will cost more time than probably all those actions you are
now describing.

Just my thought,

Cor
 
Cor,

Thanks for your reply. You may be right. What I'm trying to do is make a
synchronization routine as fast as possible, so am shaving wherever I can.

Do you have any links to any good performance tests?

I read an article about a test in March 2005 asp.netPRO , but unfortunately
it didn't say include GetChildRows in the test.


Thanks again,

Ryan
 
Ryan,

If you want performance in ADONET than it is important what version you are.

I assume that you are using 2.0 because one of the goals in that was
performance and it is showed that in some parts performance is very much
increased.

Cor
 
Unfortunatly I am using version 1.1. I am using Delphi and it doesn't have
2.0 built in yet. Hopefully later this year or early next they will, but
I'm learing C# to be safe (and more flexible).

I heard that about 2.0 and have been very anxious to get to use it!


Ryan
 
Back
Top