[rt-users] Indicies to add to RT3

Ruslan U. Zakirov cubic at acronis.ru
Wed Aug 6 11:52:09 EDT 2003


          Hello.
I've configured mysql to log slow queries and now get rid from one with:
create index CacheMemId on CachedGroupMembers(MemberId);
This table has ~190000 rows in our DB and sometimes RT do next request:
select distinct * from CachedGroupMembers where MemberId = ?;

And most freaquently report is
select get_lock('Apache-Session....',3600);
it takes about 11-40 sec from time to time.
I don't know how speed it up. Any ideas?

Another slow:
SELECT DISTINCT main.* FROM Groups main, Principals Principals_1, ACL ACL_2
WHERE ((ACL_2.RightName = 'OwnTicket') OR (ACL_2.RightName = 
'SuperUser')) AND
        ((ACL_2.PrincipalId = Principals_1.id AND ACL_2.PrincipalType = 
'Group' AND
               (main.Domain = 'SystemInternal' OR main.Domain = 
'UserDefined' OR main.Domain = 'ACLEquivalence') AND
                     main.id = Principals_1.id )
        OR (((main.Domain = 'RT::Queue-Role' AND main.Instance = 8) OR
               (main.Domain = 'RT::Ticket-Role' AND main.Instance = 
13462)) AND
               main.Type = ACL_2.PrincipalType AND main.id = 
Principals_1.id)) AND
        (ACL_2.ObjectType = 'RT::System'  OR (ACL_2.ObjectType = 
'RT::Queue' AND ACL_2.ObjectId = 8))
ORDER BY main.Name ASC;
Don't look at it optimization yet.

Matt Simonsen wrote:

>I'm hoping some people will share the indexes they've added to make
>their install of RT3 run faster.
>
>I'll start: In order to speed searches on custom fields we just added an
>index to the TicketCustomFieldValues table. This made the search time go
>from over 10 minutes to under half a second. We have 8500 tickets and
>12,500 TicketCustomFieldValues.
>
>The command I used was: 'alter table TicketCustomFieldValues add index
>(Ticket);'
>
>Matt Simonsen
>
>_______________________________________________
>rt-users mailing list
>rt-users at lists.fsck.com
>http://lists.fsck.com/mailman/listinfo/rt-users
>
>Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>  
>





More information about the rt-users mailing list