Low Kian Seong kirjoitti: > On Tue, Nov 3, 2009 at 1:33 PM, Jani Tiainen <rede...@gmail.com> wrote: >> Low Kian Seong kirjoitti: >>> I have about 3k plus record in my db table and am trying to do a >>> simple render_to_response of a template sending it the results of a >>> query. I debugged this and found that the total time taken for an >>> operation like this is 50 seconds! Is there anyway to speed this up? >>> >> Answer is maybe. > > Model: >
[clipped model code] > I isolated the code and ran the render_to_response by itself and > measured the time. > >> First you have to provide model, view and template code you're using to >> render your code, second the way you measured this 50 seconds. How about view and template..? It seems that you have few foreign keys at least that may cause extra roundtrips to db. -- Jani Tiainen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---