Re: select_related() / prefetch_related() and sharding

2015-05-21 Thread Simon Charette
Small correction, prefetch_related doesn't issue any JOIN unless a is query with a select_related is specified with a Prefetch object. Simon Le jeudi 21 mai 2015 17:53:30 UTC-4, Ash Christopher a écrit : > > Hi David, > > *select_related* does a JOIN under the hood, and you can't do > cross-dat

Re: select_related() / prefetch_related() and sharding

2015-05-21 Thread Ash Christopher
Hi David, *select_related* does a JOIN under the hood, and you can't do cross-database joins in the databases supported by Django. For prefetch_related, there is no way out of the box to perform a cross-database join in Python (which is what prefetch_related is doing) but perhaps there is some way

select_related() / prefetch_related() and sharding

2015-05-21 Thread David
Dear List, I came about conflicting information (to my mind) concerning the use of select_related() and prefetch_related(). My question is whether you can combine select_related() and prefetch_related() with sharding techniques. If so, how are you doing it? Background: I was watching various vide