countercache ? On Tue, Apr 8, 2008 at 6:16 PM, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote: > > Hi, > > I have the following structure: > > Article belongsTo Cat > Cat hasMany Article > > Now the problem is the size of my articles table (its got 180,000 > entries). So to not auto-load 180,000 entries when doing a $this->Cat- > >find(something) I had to disable recursion on my Cat (well, I > actually unbound the Article model from it, because it has other > models associated too). > > But now I want to print an Article count on my Cat index page too... > does anyone know how to handle this (non-proved ideas welcome too, > lol) while still avoiding that all associated Articles get loaded? I > know of the select count(*) strategy in MySQL, but I dont know how to > implement this using recursive requests or something (otherwise I had > to pass one query for each category which is a huge speed decrease). > > So... any help welcome, of course :-) > > Greetings from germoney, > > Arne > > >
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
