in reply to Large Constant Database in Text File

If search performance is your concern, you won't beat an RDBMS. This is what databases do. The db will look at the fields being searched, choose the best index that eliminates the most rows, and scan the rest. If you use a recent one like MySQL 5, it may even merge multiple indexes if possible to find the records.

If you have some reason why you just can't use an RDBMS, you'll have to build your own lame one. You can do it by indexing the most commonly searched fields with something like SDBM or BerkeleyDB, picking an index, and scanning the resulting rows. This will probably be more work for less speed though.

  • Comment on Re: Large Constant Database in Text File

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.