プロジェクト

全般

プロフィール

Vote #77453

完了

Speedup remove_inherited_roles

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Performance_53
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
53
version_id:
119
issue_org_id:
22850
author_id:
123153
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Environment:
  Redmine version                3.2.2.devel
  Ruby version                   2.1.5-p273 (2014-11-13) [x64-mingw32]
  Rails version                  4.2.6
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.8.1
  Filesystem
Redmine plugins:
  no plugin installed

I made an optimalization to avoid these queries, that reliably kills the application if there are many member roles.

SELECT member_roles.* FROM member_roles WHERE member_roles.inherited_from = ?

This table was retrieved with a full table scan, which is often quite bad for performance, unless you only retrieve a few rows.
The table was retrieved with this index:
No index was used in this part of the query.
You can speed up this query by querying only fields that are within the index. Or you can create an index that includes every field in your query, including the primary key.
Approximately 1224500 rows of this table were scanned.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
LGTM.
--------------------------------------------------------------------------------
Patch committed, thanks.
--------------------------------------------------------------------------------


related_issues

relates,Closed,19179,Very slow performance on editing issues when projects have inherit members checked

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0