Browse Source

Improve performance of excluding ignored topics

This generates a significantly better execution plan for the query - I
think using one of the columns from the join condition helps the
query-planner do this properly.
merge-requests/88/head
Deimos 5 years ago
parent
commit
3830f31c0e
  1. 2
      tildes/tildes/models/topic/topic_query.py

2
tildes/tildes/models/topic/topic_query.py

@ -60,7 +60,7 @@ class TopicQuery(PaginatedQuery):
self = super()._finalize()
if self.filter_ignored:
self = self.filter(TopicIgnore.created_time == None) # noqa
self = self.filter(TopicIgnore.topic_id == None) # noqa
return self

Loading…
Cancel
Save