We have a session timeout for all queries using this: 'default': { 'ENGINE': 'django.db.backends.postgresql', ... 'OPTIONS': { 'options': '-c statement_timeout=5000', ... } } } However there is a query that takes much longer to run. I want to override the 5 second constraint for this specific query. How would I do this? I tried using connection.alias to separate the query types but I'm still confused. Specifically, can someone elaborate what this article is describing with the connection.alias to limit different queries on the same server? https://medium.com/squad-engineerin...ment-timeouts-from-within-django-6ce4cd33678a Continue reading...