I've found that if I'm going to do a lot of data accesses and the data is pretty static then loading it all into a hash and saving it with
Storable to disk can be a real time saver. This works really well if you are tweaking the output, for example I was creating HTML pages from MySQL and it took quite a few queries per page. I first started just dumping the data structure with
Data::Dump on each page and then refining the output until I was happy. If I had to reload the data from the DB each time this could have been quite painful.
gav^