Changes between Version 4 and Version 5 of Ticket #33973, comment 2
- Timestamp:
- Sep 1, 2022, 3:29:06 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33973, comment 2
v4 v5 3 3 {{{ 4 4 Content.objects.all().annotate( 5 unread=Greatest( 6 Exists( 7 # a thread has no user entry (0.03s on 3.1.14 vs 0.30s on 3.2.15) 8 Thread.objects.filter( 9 content=OuterRef('pk'), 10 ).exclude(threadentry__user=user) 11 ), 12 False, 13 ) 5 unread=Exists( 6 Thread.objects.filter( 7 content=OuterRef('pk'), 8 ).exclude(threadentry__user=user) 14 9 ).filter( 15 10 unread=True,