I'd be interested to see the difference in performance between cake's
find() and a straight up php mysql call.

I personally don't think cake will have much of a problem handling
this. I would try both and see how long it takes to execute (and the
memory usage) for a simple SELECT statement. You can use mysql_query
in your controller. Just make sure your model's $recursive is set to
-1 if you have any other associations when you call find(). Heck, I
might do the same thing just to test it.

On Aug 6, 10:16 pm, jheathco <[EMAIL PROTECTED]> wrote:
> The problem is I need to retrieve them all at once because I'm
> processing the returned rows in a cronjob.  The pagination would be of
> no use for this feature.  Should I just run a manual query instead of
> using the models in this case?
>
> On Aug 6, 9:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > set the limit in the $model->find(); to an acceptable performance
> > level - you can set this dynamically - or look into the pagination
> > component
>
> > On Aug 6, 6:41 pm, jheathco <[EMAIL PROTECTED]> wrote:
>
> > > In PHP, typically prior to cake I had done
>
> > > $res = mysql_query();
> > > while($row = mysql_fetch_array($res))
> > > {
> > > ....
>
> > > }
>
> > > And now in cake, $results = Model->find([query here]) and then loop
> > > thru the results.
>
> > > I am wondering about the limitations if, for instance, a few thousand
> > > rows are returned.  In PHP, it seems looping thru each, one at a time,
> > > by calling mysql_fetch_array() was very efficient.  However, it seems
> > > like cake may have large performance (and memory) issues by trying to
> > > dump all results into an array before looping thru.
>
> > > Am I correct in this thinking?  Is there a way to have cake only
> > > return the results one at a time, rather than buffering them all into
> > > a large array?


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