Talk: Chris Seto - Big O No: Django ORM runtime complexity and how to avoid it using LATERAL JOINS

Published: 29 April 2020
on channel: PyCon US
2,122
60

Presented by:
Chris Seto

N+1 queries are as common as blog posts about how to solve them. What happens when you want to get a list of blog posts, the comments on them, and the comments’ respective authors? An exponential number of queries. The rise of GraphQL and REST APIs that provide “include” semantics make these situations increasingly common and painful. Clever use of prefetch_related and select_related may help in a pinch but never fully solve the problem. Learn how to identify these inefficient queries and optimize them using SQL aggregations and LATERAL JOINs.


Talk slides: https://docs.google.com/presentation/...
Talk resources:
Companion Repo: https://github.com/chrisseto/pycon202...
Mentioned Library: https://github.com/chrisseto/django-i...


Watch video Talk: Chris Seto - Big O No: Django ORM runtime complexity and how to avoid it using LATERAL JOINS online without registration, duration hours minute second in high quality. This video was added by user PyCon US 29 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,122 once and liked it 60 people.