We discovered this method:

Dim _dataView As DataView = New DataView(_table, String.Empty, “CartonId Asc”, DataViewRowState.CurrentRows)
Dim _rowView As DataRowView() = _dataView.FindRows(_cartonId)

To be more efficient than this method:

Dim _rows() as DataRow

_rows = _table.Select(“criteria”)

Apparently, the first method creates an in-memory index which is “seeked” through with the find method whereas the second method must perform a table scan.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s