Contribute Media
A thank you to everyone who has made this possible: Read More

Understanding the amazing world behind your ORM

Description

Every django developer has used the ORM. It's terribly useful. Suddenly creating, retrieving, updating objects becomes easy without having to use the barbaric language that SQL can be. But sometimes, out of nowhere, your API or view becomes really slow because of some magical thing happening behind your ORM. The idea of this talk is to make a journey from the ORM to the database. I will hand out different tools to debug, understand what queries are executed and when. And once you have the queries, how to optimize it? How does the database execute the queries? How to optimize your number of queries, and the execution of these?

The talk will be explained with a same example developed along the theory to understand the application better. I will give a few examples of the problems that any developer will encounter. Then explain how to identify the problem : is it possible to lower the number of queries? If not, how can I know why a specific query is slow ?

The idea is that at the end of the conference, the developer can easily access the database log, identify the view queries and understand the big lines of an EXPLAIN in the database. Not necessarily in detail, but to be able to answer: is my query making a lot of loops through many tables? Is it using an index? Am I missing an index? And what is an index by the way?

Details

Improve this page