If in your question, efficiency isn't only related to speed, the database option is the right choice (IMHO) for several reasons :
- Your data are centralized in one place ! (no synch problem, easy to administer and backup)
- Your database handle the concurrent access problems.
- It's simple (remember Keep It Simple Stupid)
Now if by efficiency you mean speed, we'll need more data
to answer
(only to check that this new solution could provide significant improvement over just optimizing your current script)
your script code, the benchmarks, the data description...
"
Only
Bad
Coders
Badly
Code
In
Perl" (OBC2IP)