0:48:40
Prefetching for Fun and Profit
DjangoCon US 2019 · October 18, 2019
Mike Hansen explains how Django’s prefetching avoids N+1 query problems: instead of fetching related data once per object, it batches related objects and associates them with the original instances. He traces the implementation from `prefetch_related()` through query evaluation, prefetchers, descriptors, the six values returned by…