Closed pbelmans closed 6 years ago
Maybe it's a good idea to use the backref
option for the extras columns? Not sure how this falls on the "Avoiding N+1 queries".
I tried this. It's not helping (but it would make the code cleaner).
The solution with tag.slogan_set
(etc.) causes lots of queries to be executed inside the Jinja template (see templates/macros.html
).
.slogan_set
initialised to a query?.slogan_set
is not using the information in the JOIN.Okay, found the solution (I think). With switch()
on a JOIN we can actually performing a join on 1 table against multiple multiple tables.
I'll finish the implementation after dinner.
Right now the chapter page for chapter 10 (Commutative algebra, tag 00AO (mind the spelling!)) is a bit slow. We hoped that implementing JOINs would improve this, but it seems that it doesn't.
We need to look into this at some point.