in reply to Re: Alternative for multiple while loops to improve performance
in thread Alternative for multiple while loops to improve performance
I often read data from a database and load it into a perl HashRef that is shaped in a way to allow me to access the data very directly for my purpose. This assumes that the data can fit within memory.
Depending on your data, this can be a huge waste of resources. As a general rule of thumb, try not to fetch more data than you really need from the database, and let the database sort, filter, and aggregate the data as much as possible.
Alexander
|
|---|