in reply to make perl text database fast? help!

1. You can speed it all up with BerkeleyDB: http://www.sleepycat.com. Low overhead, and very speedy thanks to BTree sort. Within the database, put the fields in fixed with. Multiple index calls are slow, naturellement, compared to a set of numbers. Your mileage may vary, depending on OS, memory, CPU speed, CPU caches, disk caches, disk speed, etc,etc, so use

Benchmark


and find the best solution for your situation.

BTW, making a database with links to other database just to retrieve a password, seems *very* complicated for such an operation. Why not put it all in one file, or why don't you use a RDBM (MS SQL, Postgres, Oracle, MySQL, etc)?

2. If performance is an issue, just write to a copy, and lock that copy only when writing. Every 5 mins or so, let a cron (or at) job refresh the original dbase file, and lock that file during the refresh. Or use a RDBM, see above. Oh yeah, BerkeleyDB has a transaction system as well.

Hope this helps,

Jeroen
"We are not alone"(FZ)

  • Comment on Re: make perl text database fast? help!