On Mar 4, 1:44 pm, Kottiyath <n.kottiy...@gmail.com> wrote:
> I am now managing a web server for medium (going on high) traffic
> site. I see that currently for each POST, it takes ~55-60 separate DB
> queries for providing a reply.
> Is this unusual? The total time taken for the queries is less than a
> second.
> I looked at the design and it looks somewhat well designed - i.e. to
> decrease the queries, we will have to do quite a bit of nasty things.
> Can someone give me an idea whether this amount of queries is usual?

The answer is "it depends". Generally speaking, that number of queries
would be considered high and should at least cause a developer to take
a second look at that piece more carefully as it might be an
indication of an architectural/design deficiency.

If you can share some samples of what these queries are doing, what
Django code causes them to execute, and what that view is actually
supposed to do, may be people can suggest options.

For example, does that view issue a lot reads from the DB for data
that doesn't change often? If so, you could consider memcaching that
data. Similarly, some of those read queries could benefit from adding
relevant models to its "select_related()" call.

-RD


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to