harvest-dev team mailing list archive
-
harvest-dev team
-
Mailing list archive
-
Message #00625
Re: [Bug 827874] Re: Loading '/' is too expensive
On Wed, 17 Aug 2011 09:09:08 -0000, Daniel Holbach <daniel.holbach@xxxxxxxxxx> wrote:
> A quick check with django debug toolbar tells me:
>
> - for '/': Total CPU time 264.016 msec (Elapsed time 399.378 msec) and 5 SQL queries using 30.74ms
> - for '/opportunities': Total CPU time 132.009 msec (Elapsed time: 156.254 msec) and 4 SQL queries using 30.74ms
>
> The most expensive query on the mainpage takes 23.48ms and is:
> SELECT COUNT(*) FROM "opportunities_opportunity" INNER JOIN "opportunities_opportunitylist" ON ("opportunities_opportunity"."opportunitylist_id" = "opportunities_opportunitylist"."id") WHERE ("opportunities_opportunity"."valid" = True AND "opportunities_opportunity"."last_updated" = "opportunities_opportunitylist"."last_updated")
Perhaps there's a DB index that would make this much quicker if it was
added.
I don't know how to work that out, or what index to test to see if it
helps though.
I know that Robert Collins and Clint Byrum would definitely know
though. I'm sure there are others too.
Thanks,
James
References