Wow!!!  5000 SQL queries!

I don't know what you're doing, but I hope you're not allowing lots of
people to view that page at the same time, MySQL meltdown ;-)

Cheers,


Andy

-- 
Andy Jeffries
http://andyjeffries.co.uk/      #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840


On 24 February 2010 16:41, Paul E. G. Lynch <[email protected]> wrote:

> Thanks for the reply.  I'm not sure about how many objects, but for
> page (on which we are showing way, way too much information) we do
> about 5000 SQL queries, a few of which might pull back 100 records or
> so.  I think a lot of those calls could be collapsed with eager
> loading.  But, lets say there are 6000 objects.  On my system, I
> calculated the object construction time (not including SQL time) as
> being .000031s, which for 6000 objects adds up to 0.186s-- which is
> not insignificant, though probably not our biggest performance issue.
>
> I took a look at aggregate functions, and I don't think they would be
> of much use in this case, but thanks for mentioning them because I
> wasn't aware you could do that.
>
>  --Paul
>
> On Feb 24, 6:05 am, Andy Jeffries <[email protected]> wrote:
> > > My question is, is there a way to cache the ActiveRecord objects as
> > > well?  I have read that their construction is time consuming.
> >
> > I think that used to be the case, but I don't think it is any more (which
> > may be why the Query cache doesn't cache them).  Also, how many objects
> are
> > you constructing?  It should really only be a page worth, otherwise I'd
> use
> > aggregate functions (if you're just iterating anyway).
> >
> > Cheers,
> >
> > Andy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to