[rt-users] crazy sql during "reply" action
Jesse Vincent
jesse at bestpractical.com
Mon Apr 14 01:47:58 EDT 2003
On Mon, Apr 14, 2003 at 03:30:11PM +1000, Jamie Wilkinson wrote:
> This one time, at band camp, Jesse Vincent wrote:
> >Can you tell me exactly what query it was stuck on? 13 minutes on a
> >query really sounds like your system must be thrashing to hell and back.
> >Is the machine swapping heavily?
>
> As I said ealier this thread (and I've just rechecked now to make sure, by
> turning statement logging on in postgres) the query is this:
>
> SELECT DISTINCT main.* FROM Users main, Principals Principals_1, Groups Groups_2, Principals Principals_3, Principals Principals_4, ACL ACL_5, CachedGroupMembers CachedGroupMembers_6, CachedGroupMembers CachedGroupMembers_7 WHERE ((ACL_5.RightName = 'SuperUser')OR(ACL_5.RightName = 'OwnTicket')) AND ((CachedGroupMembers_7.GroupId = '4')) AND ((Principals_1.Disabled = '0')) AND ((Principals_1.PrincipalType = 'User')) AND ((Principals_3.PrincipalType = 'User')) AND (ACL_5.ObjectType = 'RT::System' OR (ACL_5.ObjectType = 'RT::Queue' AND ACL_5.ObjectId = '4') ) AND ( (ACL_5.PrincipalId = Principals_4.Id AND Principals_4.id = Groups_2.Id AND ACL_5.PrincipalType = 'Group' AND (Groups_2.Domain = 'SystemInternal' OR Groups_2.Domain = 'UserDefined' OR Groups_2.Domain = 'ACLEquivalence')) OR ( ( (Groups_2.Domain = 'RT::Queue-Role' AND Groups_2.Instance = '4') OR ( Groups_2.Domain = 'RT::Ticket-Role' AND Groups_2.Instance = '376') ) AND Groups_2.Type = ACL_5.PrincipalType AND Groups_2.Id = Principals_4.id AND Principals_4.PrincipalType = 'Group') ) AND main.id = Principals_1.id AND Principals_1.id = CachedGroupMembers_7.MemberId AND main.id = Principals_3.id AND CachedGroupMembers_6.MemberId = Principals_3.Id AND CachedGroupMembers_6.GroupId = Principals_4.Id ORDER BY main.Name ASC
That query is very much not what is generated by 0.81_02 on my box. I
think you have an older SB installed somewhere in your @INC before
0.81_02
>
> Given that I can't see any speedup in the query, is there any way for me to
> check that RT is using the right version of DBIx::SearchBuilder?
>
Without knowing the particulars of your install, I can't tell you where
to look, but the "big hammer" is
find / -name SearchBuilder.pm
>
> --
> jaq at spacepants.org http://spacepants.org/jaq.gpg
> _______________________________________________
> 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
--
http://www.bestpractical.com/rt -- Trouble Ticketing. Free.
More information about the rt-users
mailing list