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 videos on Django under load and Django scaling,
generally there comes a point at which they point at database sharding.
Ash Christopher (
https://www.youtube.com/watch?v=frlsGUHYu04) points out
that as you use multiple databases with your Application,
select_related() and prefetch_related() can no longer be used. In
Christophe Pettus' videos I have not found such a comment, in fact
select_related() and prefetch_related() seem to be habitually
recommended to speed database connections up.
Thanks for your insights!
David