Learning about performance optimization
In today’s modern web world, any API response between 0.1 to 1 second is considered a good overall response time. In the whole request-response cycle, the database often becomes the bottleneck and we see slower responses, primarily due to bad queries or bad database design decisions.
Therefore, in this section, we’ll learn how to check for performance optimizations in the Django ORM and database layer. In the previous sections, we learned how to work with models and design database schemas using different normalization techniques, but here, our primary goal is to learn how to use Django ORM efficiently to gain performance optimizations.
One of the first techniques we should understand to gain insight into our application performance is using the explain
feature of the database query.
Demystifying performance using explain and analyze
As we develop applications in today’s world, a lot of people might frown upon...