rt4.0.3到4.4.3会由于acl检查而导致性能问题

d7v8vwbk  于 2021-06-18  发布在  Mysql
关注(0)|答案(1)|浏览(193)

我正在尝试将旧的RequestTracker 4.0.3示例更新为4.4.3。升级工作,甚至与82'319用户(包括特权ldap用户;外部授权)。
到目前为止还不错,但是我意识到使用特权用户显示队列的性能非常慢。显示的队列越长,执行时间越长。我说的是分钟数…通过使用根用户或具有管理权限的特权用户“做任何事或不做任何事”(德语翻译),我立即得到了队列。
此外,我发现mysql查询会导致执行时间过长。因为根执行不需要acl检查,所以它运行得更快。但我想花这么多时间是不正常的。花了好几个小时才弄明白。
基本上,查询(mysql explain select…)的区别是: | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | SIMPLE| Groups_2| ref| groups1,groups2,groups3| groups1 | 67 | const | 693212 | Using where; Distinct | SIMPLE | CachedGroupMembers_3 | ref | DisGrouMem,CachedGroupMembers3,cachedgroupmembers1 | DisGrouMem | 12 | rt3.Groups_2.id,const,const | 1 | Using where; Using index; Distinct 我猜groups表中的693212行差不多。旧的(仍在运行的)rt4.0.3示例与相同的未更新示例运行得如痴如醉。
我做错了吗?
顺便说一句,我在数据库升级过程中收到一个警告:
正在处理4.3.0,现在正在插入数据[6564][2018年8月29日星期三22:44:51][警告]:您有11141个用户,列“externalauthid”的值为非空。core rt不使用此列,因此可能是扩展或局部修改使用了它。请将这些用户值迁移到自定义字段或属性,因为此升级将删除这些列。在./etc/upgrade/4.3.0/content line 67.(/etc/升级/4.3.0/content:67)[6564][wed aug 29 22:44:51 2018][警告]:您有256个用户的“authsystem”列值为非空。core rt不使用此列,因此可能是扩展或局部修改使用了它。请将这些用户值迁移到自定义字段或属性,因为此升级将删除这些列。在./etc/upgrade/4.3.0/content line 67.(/etc/升级/4.3.0/content:67)
我没有改变任何东西来解决这个问题,但由于ldap用户仍然可以登录,我想这不是问题所在。
有人有什么想法吗?
用户: SELECT DISTINCT main.* FROM Tickets main LEFT JOIN Groups Groups_2 ON ( Groups_2.Domain = 'RT::Ticket-Role' ) AND ( Groups_2.Instance = main.id ) JOIN Queues Queues_1 ON ( Queues_1.id = main.Queue ) LEFT JOIN CachedGroupMembers CachedGroupMembers_3 ON ( CachedGroupMembers_3.Disabled = '0' ) AND ( CachedGroupMembers_3.MemberId = '1296794' ) AND ( CachedGroupMembers_3.GroupId = Groups_2.id ) WHERE ( ( main.Queue IN ('44', '59', '1', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '19', '20', '21', '22', '23', '24', '25', '26', '27', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '57', '58', '59', '60', '62', '63', '64', '65', '66', '68', '69', '72', '78', '79', '73', '80', '82', '83', '85', '88', '90', '92', '93', '94', '97', '99', '28', '102', '103', '106', '108', '109') OR ( CachedGroupMembers_3.MemberId IS NOT NULL AND Groups_2.Name = 'Requestor' ) OR ( CachedGroupMembers_3.MemberId IS NOT NULL AND Groups_2.Name = 'Cc' AND main.Queue IN ('77') ) OR ( CachedGroupMembers_3.MemberId IS NOT NULL AND Groups_2.Name = 'AdminCc' ) OR ( main.Owner = '1296794' ) ) ) AND (main.IsMerged IS NULL) AND (main.Status != 'deleted') AND (main.Type = 'ticket') AND (main.Queue = '72' AND ( ( Queues_1.Lifecycle = 'assets' AND ( main.Status = 'new' OR main.Status = 'allocated' OR main.Status = 'in-use' ) ) OR ( Queues_1.Lifecycle = 'default' AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) OR ( Queues_1.Lifecycle = 'approvals' AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) ) ) ORDER BY main.id ASC LIMIT 50; 11行(37.49秒)
根目录: SELECT main.* FROM Tickets main JOIN Queues Queues_1 ON ( Queues_1.id = main.Queue ) WHERE (main.IsMerged IS NULL) AND (main.Status != 'deleted') AND (main.Type = 'ticket') AND (main.Queue = '72' AND ( ( Queues_1.Lifecycle = 'default' AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) OR ( Queues_1.Lifecycle = 'assets' AND ( main.Status = 'new' OR main.Status = 'allocated' OR main.Status = 'in-use' ) ) OR ( Queues_1.Lifecycle = 'approvals' AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) ) ) ORDER BY main.id ASC LIMIT 50; 11行(0.00秒)

ggazkfy8

ggazkfy81#

好的,答案是一个“新的”请求跟踪功能:usesqlforaclcheck。
禁用此参数将返回整个性能。

相关问题