Changes between Initial Version and Version 1 of Ticket #29725, comment 24


Ignore:
Timestamp:
Jan 28, 2024, 10:24:29 AM (10 months ago)
Author:
ontowhee

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29725, comment 24

    initial v1  
    55- How many levels and combinations of chaining need to be considered? For example, I imagine it is desirable to ensure the optimization also occurs for .all().all().all().count() too. Another example would be .all().filter().count(), where the filter is technically an empty filter, but it would return a QuerySet.
    66- Where would be the best level to implement the optimization? The PR handles it in ManyRelatedManager. Another possibility could be to implement this on compiler.get_from_clause(). I found this idea from reading the comment on another ticket https://code.djangoproject.com/ticket/20535#comment:3.
     7- If it is handled in the RelatedManager level, is there a way for the RelatedManager to look ahead to determine that the next function in the chain will be a .count() or .exists()?
    78
    89I'm not sure if I'm asking the right questions. If anyone has any pointers for what areas I should look into, please let me know.
Back to Top