I have a question on what is more efficient when opening and closing database connections(using pooling).
I've read that after you have opened a db connection and are then done with it, the close it immediately. Which makes since if you only have to use it once.
What if you have a webpage that has to hit a db many times when a page is opening. Should you open and close after each query? Or leave one db connection open until you have run all the queries then close it?
I welcome any opinions
thanks
maboo59
I've read that after you have opened a db connection and are then done with it, the close it immediately. Which makes since if you only have to use it once.
What if you have a webpage that has to hit a db many times when a page is opening. Should you open and close after each query? Or leave one db connection open until you have run all the queries then close it?
I welcome any opinions
thanks
maboo59