is it possible to add an index to a datatable object

  • Thread starter Thread starter Norbert
  • Start date Start date
N

Norbert

I have to read a XML file with more than 3000 records.
is it possible to speed up the read function and is it possible to add
an index to a column or datatable to shorten the first search time

thanks

Norbert
 
Norbert,

It is possible to speed up read function. Here's how...

1. If you have DataRelations, do not use nested tables, use related tables.
To do this set Nested property on DataRelations to false.
2. Avoid using DateTime columns. If you have 3 or more columns of this
type, consider changing them to integer holding tick count.
3. Map your columns as attributes. Set DataColumn.ColumnMapping property to
MappingType.Attribute.

This should be done before you save your data as XML.

As to your second question, index is probably generated automatically.
This is why it takes so long to perform first search.
You can not store and maintain index separately.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Back
Top