PERF: N+1 queries when loading categories with featured topics.

This commit is contained in:
Guo Xiang Tan 2017-08-01 17:25:54 +09:00
parent b099c3851e
commit 17dda66400
1 changed files with 4 additions and 0 deletions

View File

@ -417,4 +417,8 @@ SQL
TopicList.preloaded_custom_fields << "accepted_answer_post_id" if TopicList.respond_to? :preloaded_custom_fields
if CategoryList.respond_to?(:preloaded_topic_custom_fields)
CategoryList.preloaded_topic_custom_fields << "accepted_answer_post_id"
end
end