Welcome Guest, Not a member yet? Register   Sign In
Loading databas instance on method request
#1

[eluser]Swedie[/eluser]
Hey,

I have a large system that loads a total of 4 databases, and I put them all inside as an ojbect inside my main class: $this->DB1 = $this->load->database(), $this->DB2 = $this->load->database() and so on.

This allows me to connect to any of my databases quick and easy. But currently my system is getting a major performance hit because of loading all of the databases the way I do.

Can I somehow tell CI's dataabase class to not connect to the database until a method (query) is being called for?

This would speed up the performance of my system by a lot.


Messages In This Thread
Loading databas instance on method request - by El Forum - 11-08-2010, 12:47 AM
Loading databas instance on method request - by El Forum - 11-08-2010, 12:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB