Facing performance issue bcoz of db data

29 views
Skip to first unread message

anjal...@gmail.com

unread,
Jan 4, 2017, 3:54:08 AM1/4/17
to Django users
In local host, for a particular query data(which is very huge) is coming up but for the same query in apache it is taking too much of time like 1 hr or more. I tried using caching of a page , even for that also Django works per user request ie for the first time for every user it will take much time and from the second time onwards cached page will comeup with no time.
Can anyone tell me what will be the root cause of it.

Vijay Khemlani

unread,
Jan 4, 2017, 8:05:27 AM1/4/17
to django...@googlegroups.com
A poorly optimized query or a query that returns too many results (too
many as un hundrends of thousands), but it doesn't make sense to
execute a query that large in a request / response cycle.

Or too many subsequent queries after the original one

Without more information it's kinda hard to tell
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/151cacab-ef29-4439-9f5b-90b130555ccc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Anjali Pradeep

unread,
Jan 4, 2017, 11:31:37 PM1/4/17
to django...@googlegroups.com
Vijay,

Thanks for the response.
I will be executing multiple queries in a nested form based on one particular criteria to form a final dictionary with a set of field values from different db table as keys and values pairs.  


Best Regards,
Anjali

On Wed, Jan 4, 2017 at 6:35 PM, Vijay Khemlani <vkhe...@gmail.com> wrote:
A poorly optimized query or a query that returns too many results (too
many as un hundrends of thousands), but it doesn't make sense to
execute a query that large in a request / response cycle.

Or too many subsequent queries after the original one

Without more information it's kinda hard to tell

On 1/4/17, anjal...@gmail.com <anjal...@gmail.com> wrote:
> In local host, for a particular query data(which is very huge) is coming up
>
> but for the same query in apache it is taking too much of time like 1 hr or
>
> more. I tried using caching of a page , even for that also Django works per
>
> user request ie for the first time for every user it will take much time
> and from the second time onwards cached page will comeup with no time.
> Can anyone tell me what will be the root cause of it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/151cacab-ef29-4439-9f5b-90b130555ccc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/nYkFJ21Yq40/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Vijay Khemlani

unread,
Jan 5, 2017, 7:23:45 AM1/5/17
to django...@googlegroups.com
You would need to execute tens of thousands of usual queries to even
come close to 1 hr of execution.

I'm still not sure whether you are making a huge unoptimized query or
thousands of subsequent queries, but you can go through your code
using pdb (or ipdb) and check which line is causing the performance
problem
>> > email to django-users...@googlegroups.com.
>> > To post to this group, send email to django...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/django-users.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msgid/django-users/151cacab-
>> ef29-4439-9f5b-90b130555ccc%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/django-users/nYkFJ21Yq40/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/CALn3ei0M3fOQCi%3DLq6wS5hX7f0CvL%
>> 3DwQOnjjtj0HDiPeZM4wQQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL2hJBZbpihB4SOFvjZ1OOZXxN6eiBo3ckFEY85DWwoz92CfRw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages