Re: Database connects without any queries

2010-03-30 Thread NdJ
Hi Cricket,

Yes debug is set to zero - quite literally I get a connect followed by
a quit while the controller retrieves its data via cache.

N


On Mar 30, 10:06 pm, cricket  wrote:
> Do you have debug set to 0? Cake sends a bunch of  DESCRIBE statements
> otherwise. Is this what you're seeing?
>
> On Mar 30, 5:23 am, NdJ  wrote:
>
> > Hi,
>
> > Recently I've noticed that CakePHP seems to cause a database connect
> > for each page load (when the controller uses a model) even if the page
> > does not perform any database query.
>
> > On the surface of things this might make sense.  My concern is that
> > I'm seeing database connects even when the data obtained through my
> > controller is clearly coming from cache.  I was not too concerned
> > about this until I happened to be doing some database performance work
> > and discovered that my database is spending most of its time dealing
> > with connect requests.
>
> > I've taken a quick look into the CakePHP source and there seems to be
> > an autoConnect parameter in the __construct() method of the DboSource
> > class that at least sounds like the kind of thing I want to tweak, but
> > I've been unable to work out how get at this properly.
>
> > Does anyone know how to stop Cake connecting to the database when it
> > does not need to in this case?
>
> > My setup in brief:-
> > * CakePHP 1.3 RC3.
> > * mysqli
> > * persistent database connections
> > * using the mk-query-digest tool to analyze database query performance
> > at the wire (very useful) -http://www.maatkit.org/doc/mk-query-digest.html
>
> > Cheers,
> > N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Database connects without any queries

2010-03-30 Thread cricket
Do you have debug set to 0? Cake sends a bunch of  DESCRIBE statements
otherwise. Is this what you're seeing?

On Mar 30, 5:23 am, NdJ  wrote:
> Hi,
>
> Recently I've noticed that CakePHP seems to cause a database connect
> for each page load (when the controller uses a model) even if the page
> does not perform any database query.
>
> On the surface of things this might make sense.  My concern is that
> I'm seeing database connects even when the data obtained through my
> controller is clearly coming from cache.  I was not too concerned
> about this until I happened to be doing some database performance work
> and discovered that my database is spending most of its time dealing
> with connect requests.
>
> I've taken a quick look into the CakePHP source and there seems to be
> an autoConnect parameter in the __construct() method of the DboSource
> class that at least sounds like the kind of thing I want to tweak, but
> I've been unable to work out how get at this properly.
>
> Does anyone know how to stop Cake connecting to the database when it
> does not need to in this case?
>
> My setup in brief:-
> * CakePHP 1.3 RC3.
> * mysqli
> * persistent database connections
> * using the mk-query-digest tool to analyze database query performance
> at the wire (very useful) -http://www.maatkit.org/doc/mk-query-digest.html
>
> Cheers,
> N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Database connects without any queries

2010-03-30 Thread NdJ
Hi,

Recently I've noticed that CakePHP seems to cause a database connect
for each page load (when the controller uses a model) even if the page
does not perform any database query.

On the surface of things this might make sense.  My concern is that
I'm seeing database connects even when the data obtained through my
controller is clearly coming from cache.  I was not too concerned
about this until I happened to be doing some database performance work
and discovered that my database is spending most of its time dealing
with connect requests.

I've taken a quick look into the CakePHP source and there seems to be
an autoConnect parameter in the __construct() method of the DboSource
class that at least sounds like the kind of thing I want to tweak, but
I've been unable to work out how get at this properly.

Does anyone know how to stop Cake connecting to the database when it
does not need to in this case?

My setup in brief:-
* CakePHP 1.3 RC3.
* mysqli
* persistent database connections
* using the mk-query-digest tool to analyze database query performance
at the wire (very useful) - http://www.maatkit.org/doc/mk-query-digest.html

Cheers,
N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.