Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Just another Perl shrine
 
PerlMonks  

Re: Foreach loop takes a long time to process and my report times out before page is rendered

by Neighbour (Friar)
on May 19, 2011 at 07:21 UTC ( #905624=note: print w/ replies, xml ) Need Help??


in reply to Foreach loop takes a long time to process and my report times out before page is rendered

Another tip:

  • Do not use sort in foreach $key ( sort keys %ctrl_tbl ) If you want to process your query-results sorted in some order, use ORDER BY in your query and fetch the results using selectall_arrayref or fetchall_arrayref. Then loop through the resulting array.


Comment on Re: Foreach loop takes a long time to process and my report times out before page is rendered
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2013-05-19 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (397 votes), past polls