in reply to Replacing SQL with perl

In some instances you can write much quicker (execution time) code by doing some of the DB work in perl rather than doing it in the DB. The downside of doing it in your code is that your code takes longer to write and is harder to maintain.

For instance, I have on numerous occasions loaded an entire table into a hash and refrenced data in it directly instead of doing a join in the SQL query. This in some cases has helped my program run as much as 20 times faster. This is only appropriate in some situations, such as when your program doesn't have to take into account any changes that might occur in the table in the DB after it was loaded.
I firmly believe that all the data should be stored inside a RDMBS, just that sometimes you can achieve a big performance boost by doing "more work in perl, and less work in SQL".