Problem with rt3-rc1, 'Reply' to a ticket, and slow mysql query

With RT3 RC1, replying to a ticket creates a slow query on the mysql server:

SELECT DISTINCT main.* FROM Users main, Principals Principals_1,
CachedGroupMembers CachedGroupMembers_2, Groups Groups_3, Principals
Principals_4, ACL ACL_5, CachedGroupMembers CachedGroupMembers_6 WHERE
((ACL_5.RightName = ‘SuperUser’)OR(ACL_5.RightName = ‘OwnTicket’)) AND
((CachedGroupMembers_2.GroupId = ‘4’)) AND ((Principals_1.Disabled = ‘0’))
AND ((Principals_1.PrincipalType = ‘User’)) AND (ACL_5.ObjectType =
‘RT::System’ OR (ACL_5.ObjectType = ‘RT::Queue’ AND ACL_5.ObjectId =
‘9’) ) AND ( Principals_4.id = Groups_3.id AND (ACL_5.PrincipalId =
Principals_4.Id AND ACL_5.PrincipalType = ‘Group’ AND (Groups_3.Domain =
‘SystemInternal’ OR Groups_3.Domain = ‘UserDefined’ OR Groups_3.Domain =
‘ACLEquivalence’)) OR ( ( (Groups_3.Domain = ‘RT::Queue-Role’ AND
Groups_3.Instance = ‘9’) OR ( Groups_3.Domain = ‘RT::Ticket-Role’ AND
Groups_3.Instance = ‘3222’) ) AND Groups_3.Type = ACL_5.PrincipalType
AND Principals_4.PrincipalType = ‘Group’) ) AND main.id = Principals_1.id
AND Principals_1.id = CachedGroupMembers_2.MemberId AND
CachedGroupMembers_6.MemberId = Principals_1.Id AND
CachedGroupMembers_6.GroupId = Principals_4.Id ORDER BY main.Name ASC

The application pauses for almost 5 minutes before the query completes and
the reply screen comes up.

Latest modules and mysql 3.23.54 on a redhat 7.3 machine. This only
started to happen when I went to 3.0 rc1. We were running a 3.0 beta
before.

Thanks,

Joseph W. Breu, CCNA fax : +1.319.266.8158
Senior Network Administrator url : http://www.cfu.net
Cedar Falls Utilities

            question = ( to ) ? be : ! be;
	              -- Wm. Shakespeare

Noted and replicated. I’ll see what I can do today. Incidentally, is
your mysql compiled with InnoDB support?On Mon, Mar 17, 2003 at 09:40:00AM -0600, Joseph W. Breu wrote:

With RT3 RC1, replying to a ticket creates a slow query on the mysql server:

SELECT DISTINCT main.* FROM Users main, Principals Principals_1,
CachedGroupMembers CachedGroupMembers_2, Groups Groups_3, Principals
Principals_4, ACL ACL_5, CachedGroupMembers CachedGroupMembers_6 WHERE
((ACL_5.RightName = ‘SuperUser’)OR(ACL_5.RightName = ‘OwnTicket’)) AND
((CachedGroupMembers_2.GroupId = ‘4’)) AND ((Principals_1.Disabled = ‘0’))
AND ((Principals_1.PrincipalType = ‘User’)) AND (ACL_5.ObjectType =
‘RT::System’ OR (ACL_5.ObjectType = ‘RT::Queue’ AND ACL_5.ObjectId =
‘9’) ) AND ( Principals_4.id = Groups_3.id AND (ACL_5.PrincipalId =
Principals_4.Id AND ACL_5.PrincipalType = ‘Group’ AND (Groups_3.Domain =
‘SystemInternal’ OR Groups_3.Domain = ‘UserDefined’ OR Groups_3.Domain =
‘ACLEquivalence’)) OR ( ( (Groups_3.Domain = ‘RT::Queue-Role’ AND
Groups_3.Instance = ‘9’) OR ( Groups_3.Domain = ‘RT::Ticket-Role’ AND
Groups_3.Instance = ‘3222’) ) AND Groups_3.Type = ACL_5.PrincipalType
AND Principals_4.PrincipalType = ‘Group’) ) AND main.id = Principals_1.id
AND Principals_1.id = CachedGroupMembers_2.MemberId AND
CachedGroupMembers_6.MemberId = Principals_1.Id AND
CachedGroupMembers_6.GroupId = Principals_4.Id ORDER BY main.Name ASC

The application pauses for almost 5 minutes before the query completes and
the reply screen comes up.

Latest modules and mysql 3.23.54 on a redhat 7.3 machine. This only
started to happen when I went to 3.0 rc1. We were running a 3.0 beta
before.


Thanks,


Joseph W. Breu, CCNA fax : +1.319.266.8158
Senior Network Administrator url : http://www.cfu.net
Cedar Falls Utilities

            question = ( to ) ? be : ! be;
                -- Wm. Shakespeare

rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

Noted and replicated. I’ll see what I can do today. Incidentally, is
your mysql compiled with InnoDB support?

I am going thro the same agony here. My tables are InnoDB. Ive tested
Reply and Comment and basically my sql queries seem to hang, not
just slow.
I’ll be happy to provide any required details. This is data migrated
from rt2 which was using MyISAM tables.

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

I migrated to PostgreSQL, hoping that this was a MySQL-specific issue,
but am still experiencing the same issue (pg actually seems to take even
longer than mysql on this query). Just thought I’d mention this, as it
doesn’t seem to be a mysql-specific issue. I was not experiencing the
issue with 2.1.85, but the issue was present when I upgraded to 2.1.88
(mysql only here), and I’ve only gotten around to installing RC1 when I
migrated to PostgreSQL.

Matthew Draper, CCNA
Systems Engineer
AirNet Commercial Australia Ltd