Any truth to charge of 'thousands of db queries' ?
Some months ago I read an anti-cake / fear mongering message, something about how cakephp routinely makes thousands of database queries to accomplish typical, regular actions. Guess what? Fear was mongered. Not trying to monger more fear, just wondering (1) was there any truth to that, and (2) if so, what, if anything, is being done about it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any truth to charge of 'thousands of db queries' ?
Yes, by default cakephp does make a lot of database queries if you have a lot of model associations. Thousands? Hmm... not really that I've seen.. but still more than one would hope for (for me sometimes between 40 and 120 per page, although all of them would take 0 ms each). Having said that, there are ways to minimise this by optimising your find calls, and only requesting the data that you need with the awesome Containable behaviour. I would also like to say that cake's database layer has undergone a bit of optimisation in the past year and queries are a lot more efficient and therefore less queries needed than what it used to be. Cheers, Adam On Oct 5, 8:53 pm, EastGhostCom [EMAIL PROTECTED] wrote: Some months ago I read an anti-cake / fear mongering message, something about how cakephp routinely makes thousands of database queries to accomplish typical, regular actions. Guess what? Fear was mongered. Not trying to monger more fear, just wondering (1) was there any truth to that, and (2) if so, what, if anything, is being done about it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any truth to charge of 'thousands of db queries' ?
As Adam said, it is an unrealistic claim to say cake makes thousands of queries to do something routine. In addition, you always have full control over the generated queries either by enforcing JOINs with on-the-fly model binding, or by using Containable to limit the amount of returned data. On Oct 5, 6:53 am, EastGhostCom [EMAIL PROTECTED] wrote: Some months ago I read an anti-cake / fear mongering message, something about how cakephp routinely makes thousands of database queries to accomplish typical, regular actions. Guess what? Fear was mongered. Not trying to monger more fear, just wondering (1) was there any truth to that, and (2) if so, what, if anything, is being done about it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---