There are two Tutorials that you should look at.
- DBI Recipes tells you what you can do, and gives you some
interesting trick about usiong hashes efficiently.
- Speeding up the DBI tells you how to find which part
of your program needs improvement, and several ways of doing it.
HTH