subqueryload() generates redundant queries
Issue #2480
resolved
When subqueryload() is used on a relation of a polymorphic table, it generates/executes the exact same query multiple times. This hurts badly when that query is a heavy one. 0.6 and 0.7 shows the same behavior, but e.g. 0.7.0 generates just 2 identical queries in the attached example while 0.7.5 generates 3.
Comments (3)
-
repo owner -
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.7.8 (automated comment)
- Log in to comment
great test. this is a side effect of something that might be improved within mapper loading overall at some point, but for now this is a patch that solves this issue for the case of subqueryloaders, as the "row processor" function created is much more expensive than any other.