On further investigation this seems to be caused by the auth AuthenticationMiddleware.
It makes a call to LazyUser for every request. Is anybody aware of a workaround for this or would this involve creating a new AuthenticationMiddleware implementation and is it possible to configure a different request implementation to only lookup the user when it is required. Thanks On Wed, Aug 25, 2010 at 10:44 PM, ste010 <[email protected]> wrote: > Hi Guys > > I switched on the debug toolbar in order to see what sql queires are > being executed for each request. > > I Noticed that the auth_user table is queried once and the > auth_message table is queried once for each request. > This is two queries per request when the user is authenticated with > the applicaiton. > > Has anybody any advice on how to limit these queires for views that > dont require authentication, authorization etc. > > > Also is there a way to turn to configure sessions in an adhoc manner > as certain requests dont require sessions? As I also see the > `django_session' table being hit for each request? > > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

