Ivaylo Donchev - Django queries optimization

  Рет қаралды 9,600

EuroPython Conference

EuroPython Conference

Күн бұрын

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.
License: This video is licensed under the CC BY-NC-SA 3.0 license: creativecommons.org/licenses/...
Please see our speaker release agreement for details: ep2018.europython.eu/en/speak...

Пікірлер: 5
@dantedt3931
@dantedt3931 3 жыл бұрын
This is great,thanks Ivaylo.
@faizanfareed9076
@faizanfareed9076 5 жыл бұрын
Thanks for this video
@axiomvp7808
@axiomvp7808 4 жыл бұрын
lol good talk, was it just me or did he check the slides to make sure he knew where he was from XD
@josephlyons3393
@josephlyons3393 2 жыл бұрын
Things don’t always go well when you’re nervous on stage.
@sifo_io
@sifo_io Жыл бұрын
Lol, it happened to a friend f mine, he checked his notebook's first page when he was asked about his name
Learn the basics of Django's Model Managers and Querysets
19:38
Matt Freire
Рет қаралды 44 М.
How to Use Select Related and Prefetch Related in Django
9:34
Pretty Printed
Рет қаралды 27 М.
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 38 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 21 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 1,5 МЛН
DjangoCon 2019 - Pushing the ORM to its limits
25:15
DjangoCon Europe
Рет қаралды 6 М.
Custom Django User Model // DJANGO Tutorial
1:04:40
CodingEntrepreneurs
Рет қаралды 155 М.
Django Tutorial - SQLite3 DataBase Tutorial
22:49
Tech With Tim
Рет қаралды 177 М.
DjangoCon 2018 - Making smarter queries with advanced ORM resources
28:37
DjangoCon 2020 | How To Break Django: With Async - Andrew Godwin
31:21
DjangoCon Europe
Рет қаралды 9 М.
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 2,1 МЛН
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 11 МЛН