|
|
|
|
|
by rowanseymour
661 days ago
|
|
I adore the Django ORM but as listed under cons... it makes it very hard to avoid accidental N+1 queries, and they don't seem interested in addressing this (https://code.djangoproject.com/ticket/30874). Yes lazy loading is neat when you're messing around on the shell, but you should absolutely not be leaning on it in production at any kind of scale. So instead you have to use unit tests to hopefully catch any N+1 queries. |
|
I use https://pypi.org/project/django-nplusone/ for instance. Sentry also warns of these by the way.