Reputation: 625
I have an array in visual basic.net that is currently over 400 million values. I was wondering - how do I easily create an index of this array and store it to a save file to reduce the time spent iterating through the array and locating the 1st 0 for example. Also - if I am iterating 400 million times to locate the value I seek, don't I have to iterate through the index as instead? If this is the case, how does the index (which will be a larger array likely) improve my variable retrieval time if I simply end up having to iterate through a larger array?! (Maybe I've not thought this part through properly)
Indexes are very useful for speedup in MySQL Db's so this should be implementable.
Thanks in advance Martin
Upvotes: 0
Views: 292
Reputation: 25505
There is a whole class of software called data bases that are specifically designed to store and retrieve data in an efficient manner. Any index you write will be some implementation of a well know algorithm already written and tuned in a DBMS. For .net you first choose would be sql server.
Upvotes: 1