Hi all --

I have tried to manually define the schema in the models -- i.e.,

class MyModel extends AppModel {
        var $name = 'MyModel ';

        var $_schema = array(
                'id'=> array('type' => 'integer', 'null' => '', 'default' => 
'1',
'length' => '8', 'key'=>'primary'),
                'name'=>array('type'=>'string', 'null'=>'', 'default'=>'',
'length'=>'50'),
                'created'=> array('type' => 'date', 'null' => '1', 'default' => 
'',
'length' => ''),
                'modified'=> array('type' => 'datetime', 'null' => '1', 
'default' =>
'', 'length' => null)
        );
}

but every page view always brings up first the auth tables (aros,
acos, aros_acos) and then every table that I use in the controller
even if the view isn't requiring that table... in some cases up to 20+
tables.  My DBA doesn't like this at all performance wise.  I've
looked at the bakery and other cakephp docs but haven't found an
answer and I'd really like to stop this from happening...

Thanks,
bg


---------- Forwarded message ----------
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Date: Dec 18 2007, 2:56 am
Subject: DESCRIBE happening too often
To: CakePHP


As far as I know, the describe should not occur if there is is a
schema defined for the database tables. The new console in 1.2 should
generate this automatically when you create a new model with 'cake
bake'. I haven't tried it yet cause i can't find those bloody minutes
but i can't postpone it much longer. If you do happen to find a
solution until then please let me know too. I would appreciate it.

Thanks,
Cristian

On Dec 16, 5:26 am, "Olexandr Melnyk" <[EMAIL PROTECTED]> wrote:

> SHOW PROCESSLIST

> On 12/14/07, Grant Cox <[EMAIL PROTECTED]> wrote:

> > How are you checking that you are getting a lot of DESCRIBE queries
> > with DEBUG set to 0?

> > On Dec 14, 7:09 am, "Olexandr Melnyk" <[EMAIL PROTECTED]> wrote:
> > > Hello bakers,

> > > in one of applications I'm working on, I have noticed DESCRIBE queries
> > being
> > > executed on every page for all used models. With a load of page views,
> > this
> > > only creates problems.

> > > As far as I know, such queries should be cached if
> > > application is in production (DEBUG = 0), but I still get them quite
> > > often. I have cheched /app/tmp/ directory permissions, and they are set
> > to 777.

> > > I am using CakePHP 1.1

> > > I don't know if CakePHP's cache expires after a number of pageviews
> > since
> > > last update or after a set
> > > period of time, but is there a way to extend its lifetime?

> > > Thanks

> > > --
> > > Sincerely yours,
> > > Olexandr Melnyk <><http://omelnyk.net/

> --
> Sincerely yours,
> Olexandr Melnykhttp://omelnyk.net/

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