Welcome Guest, Not a member yet? Register   Sign In
Database query caching not working
#6

[eluser]fchristant[/eluser]
Quote:That’s a nice idea, but I’m not sure it’s necessary. Simply connecting to a database should not cause any performance issues.

I agree, performance issues no, scalability issues yes. The number of open MySQL connections is one of the most important bottlenecks in scaling it.

Quote:Have you set pconnect to TRUE in database.php for your database connection?

This is a nice suggestion, but not what I'm looking for. I want a connection to be open for all queries of a controller, not beyond the life cycle of the page. Plus, persistent connections cause a lot of problems with multiple databases and transactions.

Quote:CodeIgniter is built with simplicity in mind, and whilst some things may be better implemented a differently, it’s still very efficient compared to a lot of other frameworks.

I agree about the simplicity and efficiency, and I'm a CI fan for sure. Still, it is important that robustness and making things work correctly are not sacrificed for these goals. Two examples:

- The bug I reported above. when using the db class as designed (using parameter replacement, a standard practice) and enabling caching, it does not work. I cannot believe this is not tested or found by someone else. Is everybody hardcoding SQL?

- Transactions. A previous disappointment I had was with transactions. Cache seems to influence it and nested transactions don't work, which is a showstopper if you need transactions, you want those for reliability. I had to go in and patch the core to make that work.

Things like this make me doubtful about the robustness of CI and whether I should use it for big/important sites. My point in summary: Yes, keep things simple and light, but above all...make sure it works first.


Messages In This Thread
Database query caching not working - by El Forum - 05-21-2009, 05:52 AM
Database query caching not working - by El Forum - 05-21-2009, 06:13 AM
Database query caching not working - by El Forum - 05-21-2009, 06:39 AM
Database query caching not working - by El Forum - 05-21-2009, 06:49 AM
Database query caching not working - by El Forum - 05-21-2009, 07:08 AM
Database query caching not working - by El Forum - 05-21-2009, 11:30 AM
Database query caching not working - by El Forum - 05-21-2009, 11:38 AM
Database query caching not working - by El Forum - 05-21-2009, 12:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB