ociplogon behavior w/ multiple calls?

admin

Administrator
Staff member
I'm curious as to whether there are any bad consequences to calling ociplogon() multiple times to the same database on the same page. We use a database access object and the current practice is usually to create a new object for every unique database query. However we have no mechanism for calling ociplogon only once for all database objects. Each object calls its own ociplogon statement once with the same connection settings to the same db. Is it worth trying to get them all to share the same ociplogon call? We're using Apache and PHP4 (ran as a module).

I'm nervous about multiple ociplogon calls on the same page, since if I echo the results of the ociplogon() call, I get a different resource ID almost every time. Not sure if this means it's taking extra time in trying to find another seperate connection or if it's just innocently pulling an open connection from the pool without any consequence. I certainly hope this doesn't consume multiple connections per page, in which case we may need to rework our strategy. Or maybe the resource ID doesn't mean a whole lot and I'm just being paranoid.

Thanks for any feedback.
 
Back
Top