Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Alternative for multiple while loops to improve performance

by afoken (Canon)
on Dec 19, 2018 at 19:25 UTC ( #1227482=note: print w/replies, xml ) Need Help??


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

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^2: Alternative for multiple while loops to improve performance

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1227482]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2019-07-19 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?