Yes, the more models you use, the more overhead there is. Not only in  
terms of database hits, but simply the fact that an additional class  
needs to be included and loaded. So design your database and models  
wisely from the start.

Having said that, this overhead is often negligible, except for truly  
performance hungry apps. If you have such a performance hungry app,  
think about conditionally loading models with App::import.
Also, as soon as you go to debug mode 0, the models will be cached and  
not DESCRIBED every single time. (What Larry said.)

On 12 Oct 2008, at 11:42, [EMAIL PROTECTED] wrote:

>
> Hi there,
>
> My controller includes eight models as follows,
> var $uses = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H');
>
> When loading a view for the controller, it always DESCRIBE the above
> eight TABLES (models) even the action (view) has nothing to do with
> these tables. From the cakephp log on view, it is a big performance
> hit for me.
>
> Q:
> 1. is this by design?
> 2. how to reduce these queries?
>
> I didn't get much helpful info from internet and cakephp official
> site. I'd appreciate it if any help (or article link).
>
> Thanks,
> Bo
> >


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to