Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Massive Memory Leak

by afoken (Monsignor)
on Dec 07, 2009 at 16:46 UTC ( #811546=note: print w/replies, xml ) Need Help??


in reply to Massive Memory Leak

I don't see a finish() call for the database statement handle. That could be a problem, even if the handle SHOULD be closed automatically when it runs out of scope.

And you have a real problem, because you really try hard to avoid DBI placeholders. You are building a gapping security hole called SQL injection, and you sabotage any caching that MySQL may attempt. Build and prepare() the statement once, then call it repeatedly passing all variables to execute(), and finally finish() it.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811546]
help
Chatterbox?
[Aristotle]: gosh I havenít been here in such a long time

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2017-02-27 02:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.