empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Kirsch <Harald.Kir...@raytion.com>
Subject prepared statements best practices
Date Mon, 13 May 2013 13:25:51 GMT
Hi there,

what are considered best practices for reusing DBCommand objects, in 
particular when they contain prepared statements or, rather, had 
addParam() called. Is it recommended to reuse the objects and just 
change the parameters?

In the SampleAdvApp only the parameters are changed. But I would like to 
be sure that this is not only done because the object is on the stack 
anyway. What if I would need to store it, typically in a ThreadLocal. Is 
that worth the effort given that I am feeding 40 million rows into the DB?

Thanks,
Harald.

-- 
Harald Kirsch
Raytion GmbH


Mime
View raw message