Welcome Guest, Not a member yet? Register   Sign In
Models not sharing DB connections. Performance issues?
#1

[eluser]gon[/eluser]
Hi,

Do models share a single database connection?
I suspect they don't, as it's possible to pass each of them a different DB config.

When I used plain PHP, I would create a single connection that was used by every model.

Is there a way of doing this, and does it make sense in CI?

The reason is, obviously, performance. We expect a lot of hits on the website.
Prior to other strategies, I would like to optimize the core.

Regards.
#2

[eluser]nirbhab[/eluser]
In CI all models and controller access to same DB connection if you are extending the class by model, controller.
#3

[eluser]tonanbarbarian[/eluser]
i believe if you pass a db connection information to a model it changes all models to then use that db connection
but i could be wrong




Theme © iAndrew 2016 - Forum software by © MyBB