Patch #22850

Updated by Toshi MARUYAMA over 1 year ago

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
Git 2.8.1
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.