[rt-users] Certain RT operations painfully slow.

Todd Chapman todd at chaka.net
Tue Jan 18 13:41:00 EST 2011


And here is the slow query for adding a new member to a group that is
AdminCc on a large number of tickets:

     db: rt3
Command: Query
   Time: 59
  State: Sending data
   Info: SELECT main.* FROM CachedGroupMembers main   WHERE
((main.MemberId = 541915))

mysql> explain SELECT main.* FROM CachedGroupMembers main   WHERE
((main.MemberId = 541915))\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: main
         type: ref
possible_keys: CachedGroupMembers3
          key: CachedGroupMembers3
      key_len: 5
          ref: const
         rows: 417216
        Extra: Using where
1 row in set (0.00 sec)

Even when the query completes RT takes a long time to complete.
Perhaps the query is timing out and RT goes off into the weeds?

RT version 3.6.3.

On Tue, Jan 18, 2011 at 12:43 PM, Todd Chapman <todd at chaka.net> wrote:
> RT Users,
>
> A few years ago we started adding a group as AdminCc to many tickets.
> It made sense for our process and seemed like a good idea at the time.
> Fast forward to today. This group is AdminCc on many, many tickets.
> Now when we add a new member to the group it can take 15 minutes for
> the add to complete, usually with the web interface timing out.
>
> To alleviate this situation I wrote a script to remove this group from
> many old tickets, but this too is taking a long time to complete.
> Here's the key line from the script:
>
> my ($status, $msg) = $t->DeleteWatcher(PrincipalId => $pid, Type =>
> "AdminCc", Silent => 1);
>
> Which causes this long running mysql query:
>
>
> Command: Query
>   Time: 86
>  State: Sending data
>   Info: SELECT main.* FROM CachedGroupMembers main   WHERE ((main.Via
> = '28522070')) AND ((main.id != '28522070'))
>
>
> Ouch.
>
> Can anyone recommend an approach to fixing this problem?
>
> Thanks.
>



More information about the rt-users mailing list