A Related Matter: Optimizing your webapp by using django-debug-toolbar, ... with Christopher Adams
A Related Matter: Optimizing your webapp by using django-debug-toolbar, select_related(), and prefetch_related() with Christopher Adams
What happens in an HTTP request-response cycle is often difficult to understand. Optimizing database queries is a crucial aspect of web development, yet it often remains shrouded in mystery for many beginners. By attending this talk, attendees will gain practical insights into how to leverage django-debug-toolbar to inspect an HTTP request-response cycle. By revealing and fixing pathological queries, developers can improve application performance and user experience. The talk will cover indexing, select_related, prefetching, and other optimization strategies.
During the session, I will guide attendees through the following key points:
Understanding Query Execution: Exploring the anatomy of a QuerySet, focusing on immutability, lazy evaluation, and the fact that a QuerySet is not a query. Introduction to django-debug-toolbar: An overview of what django-debug-toolbar is and how it can be integrated into Django projects. Identifying Pathological Queries: Techniques for using django-debug-toolbar to identify slow or inefficient database queries within an HTTP request. Strategies for Optimization: Practical tips and strategies for optimizing identified queries, including indexing, select_related, prefetching, and other optimization. Real-World Examples: Illustrative examples and case studies demonstrating the impact of query optimization on application performance. This talk is ideal for beginners in Django development who are looking to deepen their understanding of query optimization and improve the performance of their Django applications. Attendees should have a basic familiarity with Django concepts such as models and basic database design, but no prior experience with query optimization is required.
This talk was presented at: https://2024.djangocon.us/talks/a-related-matter-optimizing-your-webapp-by-using-django-debug-toolbar-select-related-and-prefetch-related/
LINKS: Follow Christopher Adams 👇 On GitHub: https://github.com/adamsc64 On X: https://x.com/adamsc64 Website: http://christopheradams.info
Follow DjangoCon US 👇 https://fosstodon.org/@djangocon https://x.com/djangocon
Follow DEFNA 👇 https://www.defna.org/
Video production by Confreaks Follow Confreaks 👇 https://confreaks.com https://x.com/confreaks
Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.