$this->{model}->findCount(null, -1); // 2nd param is the recursive

On Nov 16, 3:56 pm, "sbarre" <[EMAIL PROTECTED]> wrote:
> I'm running into peformance issues with the findCount() method in the
> model class..
>
> I am doing a listing of records in a given table, and the record has a
> few associations for it, however the table that I am querying has 1.8
> million records in it, and while I turn off the recursive  option in
> findAll() (which keeps my query time down to 17ms), the findCount()
> method still LEFT JOINs the 3 other association tables when simply
> doing a count(*) operation, and this gives me a 16000ms execution time
> on the findCount() method.
>
> Is there a way to tell findCount() that I don't care about the
> associations, much like I can with findAll()?
>
> I suppose I can override it, but this seems like something that should
> be in the model class, no?


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" 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