filmov
tv
Ivaylo Donchev - Django queries optimization
Показать описание
Django queries optimization
[EuroPython 2018 - Talk - 2018-07-26 - Kilsyth]
[Edinburgh, UK]
By Ivaylo Donchev
Collecting data from multiple Models is a common flow in Django development. In most of the cases prefetch_related and select_related do all of the job for optimizing the queries.
When the models structure become complicated enough and we've put our logic for collecting these items in models' properties we suddenly cannot use prefetch_related or select_related anymore. Our View 's queries count depends on selected items count with high complexity. The problem is in the selection logic: we've implemented an algorithm which calculates something and we cannot prefetch or select all of the objects.
So this talk's purpose is: To show how to use Django ORM to move the selection logic, the calculations, the aggregations over group of objects from our python code to our database and moving all of the logic for this in one place - the queryset and test it easily.
[EuroPython 2018 - Talk - 2018-07-26 - Kilsyth]
[Edinburgh, UK]
By Ivaylo Donchev
Collecting data from multiple Models is a common flow in Django development. In most of the cases prefetch_related and select_related do all of the job for optimizing the queries.
When the models structure become complicated enough and we've put our logic for collecting these items in models' properties we suddenly cannot use prefetch_related or select_related anymore. Our View 's queries count depends on selected items count with high complexity. The problem is in the selection logic: we've implemented an algorithm which calculates something and we cannot prefetch or select all of the objects.
So this talk's purpose is: To show how to use Django ORM to move the selection logic, the calculations, the aggregations over group of objects from our python code to our database and moving all of the logic for this in one place - the queryset and test it easily.
Ivaylo Donchev - Django queries optimization
ivaylo donchev django queries optimization
Django Bulgaria 3rd 2020 meetup: “Rules of thumb for queries optimization” by Ivaylo Donchev
A quick guide to logging for Django developers — Ivaylo Donchev
Ivaylo Donchev (HackSoft) @ PyCon Balkan 2018 - Day 1
Async Django - presented by Ivaylo Donchev
'Logging in Django - tips and tricks' by Ivaylo Donchev [Django Bulgaria Meetup - February...
Building effective Django queries with expressions
Django Model Inheritance - InheritanceManager from django-model-utils
DjangoCon 2019 - Building effective Django queries with expressions by Vanessa Barreiros
Database Model Queries | Django (3.0) Crash Course Tutorials (pt 7)
Django select_related Examples |Django select_related and prefetch_related |Django n+1 Query Problem
Mastering django query | How to master django queries | Part 1
Faster Django Queries With Materialized Views
Django ORM | Case Study 1 | Query 1 | Implementation | All Products
Optimize queries in Django
Advanced Django Queries | Optimize Database Queries | Django Tips#3
DjangoCon 2018 - Making smarter queries with advanced ORM resources
Faster Django Websites Using simple SQL Optimization
Django Full Course - 8.1 - Database access optimization. Queryset optimization
Make your django query faster | Select related and prefetch related Django
How to Use Select Related and Prefetch Related in Django
Django ORM (Querysets) [Django Beginner Tutorial 9]
Basics of Django Aggregation
Комментарии