[Rt-commit] rt branch 5.0/specify-addl-ticket-transaction-join-criteria created. rt-5.0.3-255-g9680f753c0

BPS Git Server git at git.bestpractical.com
Fri Feb 17 20:46:09 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/specify-addl-ticket-transaction-join-criteria has been created
        at  9680f753c0f0fdd506d1cd46331e2efc68792354 (commit)

- Log -----------------------------------------------------------------
commit 9680f753c0f0fdd506d1cd46331e2efc68792354
Author: Jason Crome <jcrome at bestpractical.com>
Date:   Fri Feb 17 15:38:12 2023 -0500

    Add JOIN criteria for transaction searches
    
    Transaction searches cannot use the existing index on the transactions
    table if ObjectType is not provided. Adding ObjectType to the join
    greatly improves the performance of transaction searches, especially for
    RT databases with large numbers of transactions.

diff --git a/lib/RT/Transactions.pm b/lib/RT/Transactions.pm
index 6ee5697bb4..d12e3dcec7 100644
--- a/lib/RT/Transactions.pm
+++ b/lib/RT/Transactions.pm
@@ -1114,6 +1114,7 @@ sub _JoinTickets {
             FIELD1 => 'ObjectId',
             TABLE2 => 'Tickets',
             FIELD2 => 'id',
+            EXPRESSION => "main.ObjectId AND main.ObjectType='RT::Ticket'",
         );
     }
     return $self->{_sql_aliases}{tickets};

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list