Have you try caching the queries? Just add      var $cacheQueries=true; in
your app_model.php

Cache query will not make a query twice example;

$this->set('name',$this->Model->field('name',array('id'=>$id)));
//more code
if($this->Model->field('name',array('id'=>$id))=='something'){
  //doSomething
}

Without cacheQueries this will make two times a query SELECT name FROM
model as Model where Model.id=$id

Cheers!

On 13 jul, 09:51, Alex Bovey <[email protected]> wrote:
> On Tue, Jul 13, 2010 at 12:24 PM, Mike Karthauser
> <[email protected]>wrote:
>
> > refining by writing custom queries can be useful but having found an issue
> > recently where repeated custom queries were stealing memory and not being
> > cleared by garbage collection, i'd be a bit wary of this as a solution.
>
> > if you do have issues with lots of queries, then you might also be worth
> > looking at view/ object caching if they are having performance issues on
> > your application.
>
> > you'd also be worth moving up to a more recent version of cake1.2 as the
> > recent code releases are more optimised than the version you are using.
>
> > mikek
>
> Cheers Mike - I will give that a go in the first instance  - might even go
> to 1.3.
>
> Interesting what you say about custom queries.
>
> I definitely need to add some more caching but I thought there might be a
> quick fix reducing the number of queries first.
>
> Cheers,
>
> Alex

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 [email protected]
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