]> git.uio.no Git - usit-rt.git/blobdiff - sbin/rt-fulltext-indexer
Upgrade to 4.0.8 with modification of ExternalAuth.
[usit-rt.git] / sbin / rt-fulltext-indexer
index a2aae5eef61ec93407435049375975651e459263..b2f4af09851eb68ffb81fb4e0a6ee41a4977ed28 100755 (executable)
@@ -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",