
17 May
2011
17 May
'11
8:36 p.m.
Hi Felipe,
On Wed, May 18, 2011 at 12:25 PM, Felipe Almeida Lessa
IIRC, runDB runs on a pool of DB connections, so it never creates a connection, it only grabs one connection from the pool.
Ah, yes. My mistake.
That said, runDB needs to get a connection from the pool even if you don't use it all. Also, it needs to start and commit a transaction (although I guess that drivers may optimize away the commit knowing that you didn't do anything). So while a connection startup/teardown cycle won't be needed, you will need to use the resource that other thread could be using.
Does that make sense? I'm not sure if all I've said is correct, but I think so.
Makes sense to me.