in reply to Best practices for closing database connections?
Should a single connection be opened, and all queries funneled through that before closing it (and the script itself)?
This would be my default approach unless there is a good reason for either multiple concurrent connections within your one script or the expectation of a long wait between queries (which would mean holding a connection open for no good reason). The definition of "a long wait" will depend on your situation.
🦛
|
---|