summaryrefslogtreecommitdiff
path: root/rt/sbin/rt-fulltext-indexer.in
diff options
context:
space:
mode:
Diffstat (limited to 'rt/sbin/rt-fulltext-indexer.in')
-rw-r--r--rt/sbin/rt-fulltext-indexer.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/rt/sbin/rt-fulltext-indexer.in b/rt/sbin/rt-fulltext-indexer.in
index 7e31cac84..06aa89270 100644
--- a/rt/sbin/rt-fulltext-indexer.in
+++ b/rt/sbin/rt-fulltext-indexer.in
@@ -217,6 +217,11 @@ sub attachments {
VALUE => 'deleted'
);
+ # On newer DBIx::SearchBuilder's, indicate that making the query DISTINCT
+ # is unnecessary because the joins won't produce duplicates. This
+ # drastically improves performance when fetching attachments.
+ $res->{joins_are_distinct} = 1;
+
return goto_specific(
suffix => $type,
error => "Don't know how to find $type attachments",