Recent testing in a Django project showed that enabling connection pooling by adding 'OPTIONS': {'pool': True} in the DATABASES settings resulted in a 5.4 times increase in request handling speed. The tests were performed using oha against a simple view that contained a database query, revealing that connections without pooling had an average request rate of 194.76 requests/sec, while with pooling, it improved to 1054.48 requests/sec. Furthermore, even a simple view without database interaction yielded impressive results, demonstrating the efficiency improvements connection pooling can bring.
Adding 'OPTIONS': {'pool': True}, to the DATABASES['default'] config made this endpoint 5.4 times faster.
Collection
[
|
...
]