4 ms·
prefetch_related and select_related are pretty straightforward, but for more complex stuff the Django ORM can be a hindrance. I haven’t checked out Prisma. Tha
by saila 5y ago
prefetch_related and select_related are pretty straightforward, but for more complex stuff the Django ORM can be a hindrance.
I haven’t checked out Prisma. Thanks for the tip.
- crucialfelix 5y agoSure, I always have to spend time checking logs and tuning the queries like that. By default, Django selects everything. I used to discover that joins and prefetches were hauling in large text fields when I only wanted an id or a slug. Prisma has a great API for this, and it's easy to tune. By default is prefetches and selects related even several levels of joins deep.