Indexing a datatable column

  • Thread starter Thread starter Ronchese
  • Start date Start date
R

Ronchese

Hey All!

I would like to create a index to a column in my datatable (full created in
memory). That's because I'll search that column a lot, and this manner I
want to improve the search speedy on that.

How can I create that index?

Ps: I can't use the PrimaryKey property to this case, because that columns
can have duplicate values.


[]s
Cesar
 
Ronchese,


By implementing the hashtable in this you are already there, however can you
show us which search method you did use. There are four to use, did you try
them all?

Cor
 
Cor,

I'm using the .Select() method of the Datatable, to find the row.



"Cor Ligthert [MVP]" <[email protected]> escreveu na mensagem
Ronchese,


By implementing the hashtable in this you are already there, however can you
show us which search method you did use. There are four to use, did you try
them all?

Cor
 
Cor,

once the DataView is sorted by a column, is true that it will perform some
quick algoritm to find data in that column? If yes, is what I'm searching.

Cesar





Ronchese,
I'm using the .Select() method of the Datatable, to find the row.

The slowest one :-)

Have a look at
Dataview.rowfilter

http://msdn.microsoft.com/library/d...rlrfsystemdatadataviewclassrowfiltertopic.asp

Datarowcollection.find

http://msdn.microsoft.com/library/d...systemdatadatarowcollectionclassfindtopic.asp

Dataview.find
http://msdn.microsoft.com/library/d...tml/frlrfsystemdatadataviewclassfindtopic.asp

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top