Thursday, January 9, 2014

Re: need django.cache advice

Den 09/01/2014 kl. 22.43 skrev Sells, Fred <fred.sells@adventistcare.org>:

> Fred: I was unclear. The initial join is 10000 x 1000 x 20 x 100 ... which gets reduced to about 1000 records.

This still shouldn't be a problem as long as the database has proper indexes. Is the reduction to (at most) 25 records something you *must* do in Django, or could you add additional filters to the queryset, to get only the rows you want?

> Fred: I suspect (but have not confirmed) that the problem in connection pooling (i.e. lack thereof). Some requests timeout and blank out the web page on the terminal

Ok. Does it work if you have only 5 or 10 simultaneous terminals instead of 100?

Here are some random suggestions:

Test persistent connections and connection pooling, as you said.

Check that your web server is actually configured to handle 100 simultaneous connections.

Get the exact SQL query, log into your database and look at the execution plan: "EXPLAIN SELECT blablabla". Does it do full table scans or other nasty stuff? Missing indexes on the columns used in the join?

Install the Django Debug Toolbar if you haven't already, and look at the report for the request in your browser.

Erik

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/33C654D7-9C62-4857-9C9B-B5B3E00FB13D%40cederstrand.dk.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate