I'm writing a forking HTTP server that needs to access a database with each
hit.  Speed is pretty important, so I was hoping to reuse database handles
and prepared statement handles in the forked child processes.  Is this
possible, or do I really need to reconnect to the database and prepare the
statements in each child?

Info I found from googling, faqs, and list archives generally implies
reconnection is required, but is inconclusive (at least what I found).

Alternately, is there any way to clone (deep or shallow) a prepared
statement handle without repreparing, or a database handle without
reconnecting?

The only solution I've come up with is to have the server daemon manage a
pool of connected database handles and prepared statement handles, which
complicates the program a bit.  Any other solutions I'm missing?

Thanks!  Links to old discussions welcome if this has been answered before.

James

Reply via email to