[rt-users] Fw: slow query on RT 4.2.9 with postgres

Alex Vandiver alexmv at bestpractical.com
Mon Jan 5 13:01:27 EST 2015


On 12/31/2014 11:58 AM, Mark Szidik wrote:
> I just upgraded from 4.0.7 to 4.2.9 and I am running to some very slow
> page loads that were not an issue with the old version of RT.
> 
> When simply requesting the new search page
> (/Search/Build.html?NewQuery=1
> <https://rt.mcls.org/Search/Build.html?NewQuery=1>) it takes about 20
> seconds to load the page.  PostgreSQL (version 9.3.5)  logs this slow
> query.
> 
> LOG:  duration: 20985.257 ms  execute <unnamed>: SELECT DISTINCT main.*
> FROM Users main CROSS JOIN ACL ACL_3 JOIN Principals Principals_1  ON (
> Principals_1.id = main.id ) JOIN CachedGroupMembers CachedGroupMembers_2
>  ON ( CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN
> CachedGroupMembers CachedGroupMembers_4  ON (
> CachedGroupMembers_4.MemberId = Principals_1.id )  WHERE
> ((ACL_3.ObjectType = 'RT::Queue') OR (ACL_3.ObjectType = 'RT::System'
> AND ACL_3.ObjectId   = 1)) AND (ACL_3.PrincipalId =
> CachedGroupMembers_4.GroupId) AND (ACL_3.PrincipalType = 'Group') AND
> (ACL_3.RightName = 'OwnTicket' OR ACL_3.RightName = 'SuperUser') AND
> (CachedGroupMembers_2.Disabled = '0') AND (CachedGroupMembers_2.GroupId
> = '4') AND (CachedGroupMembers_4.Disabled = '0') AND
> (Principals_1.Disabled = '0') AND (Principals_1.PrincipalType = 'User')
> AND (Principals_1.id != '1')  ORDER BY main.Name ASC
> 
> this (slow) query also shows up when look at the
> Display/Basics/People/Jumbo tabs of a ticket in the general queue, but
> not in other queues.

How many users have the "OwnTicket" right in the General queue?  Have
you run "VACUUM ANALYZE" since the upgrade?
 - Alex




More information about the rt-users mailing list