Fixes #5568 - Improves performance of trends:clean rake task
Perform trend counter dupe counting within the database rather than in the Ruby code.
(cherry picked from commit 040abfa32f326de7cd488f34f243377f76fd70ae)
Conflicts: test/lib/tasks/trends_test.rb
Fixes #5568 - Improves performance of trends:clean rake task
Perform trend counter dupe counting within the database rather than in the Ruby code.
(cherry picked from commit 040abfa32f326de7cd488f34f243377f76fd70ae)
Conflicts:
test/lib/tasks/trends_test.rb