Queryset Implementation. Malcolm explains the work that has gone in to the queryset-refactor branch. Executive summary: Python’s ORM is probably a lot better at SQL than you are.
Queryset Implementation. Malcolm explains the work that has gone in to the queryset-refactor branch. Executive summary: Python’s ORM is probably a lot better at SQL than you are.
That's very generous of you, Simon, but it's overstating the reality. I'm deliberately not using a lot of tricky transformations and constructions that would be possible with a different internal representation in order to keep the code reasonably simple and fast. We're not trying to replace SQL 100% in Django, so it's probably acceptable to be completely correct and "fast enough".