No, There is not, I was just Trying to find the best way to do this since my way sucks | [reply] |
If you are just looking for exact matches, then a non-SQL database like DB_File (the tied-hash interface) is probably adequate; if not, then a SQL database using 1 table, 1 column, and an index. Then of course you have to develop processes to update the database and keep in sync with the text files.
| [reply] |
There is also File::SortedSeek which I have no experience with, but might be "good enough" if the files are sorted, and would save you from keeping the database in sync with the text files.
| [reply] |
It appears that you are installing and running this on each desktop. This is highly inefficient a slient server model would be a lot better as this would decrease the workload on the desktop machine.
The simplest way of doing this is using a database and you get the performance benifits if server caching index.
Your current code appears to do a straight string match similar to a like. Indexes are not as good as handling these kinds of searches as the whole string is not matched. If you are matching a complete sting an index is very fast.
If you need fast lookups on partial numbers you might look at either reverse indexes that sort based on the digits in reverse order or preprocessing the numbers and extracting sequences of digits and then indexing them.
UnderMine
| [reply] |