What's Inside a DataRelation?

  • Thread starter Thread starter Mathew Weaver
  • Start date Start date
M

Mathew Weaver

Does anyone know what data structure and/or method a DataRelation provides
to implement DataRow.GetParentRow() and DataRow.GetChildRows()?

Doing some testing, the DataRow.GetParentRow() method is much faster than
using DataTable.Select() on the parent table to find the parent row. And
DataRow.GetChildRows() is much faster than using DataTable.Select() on the
child table to get the child rows.

What does DataRelation provide that makes this so much faster?
 
Hello !

Both methods uses index to find a range of rows or single row.
Select method may use index, but it will depend on some
conditions.

Regards,
Dmitry
 
Back
Top