Patch #37057 » 0001-Attachment-activity-provider-sql-optimization.patch
app/models/attachment.rb | ||
---|---|---|
48 | 48 |
:scope => |
49 | 49 |
proc do |
50 | 50 |
select("#{Attachment.table_name}.*"). |
51 |
where(container_type: ['Version', 'Project']). |
|
51 | 52 |
joins( |
52 | 53 |
"LEFT JOIN #{Version.table_name} " \ |
53 | 54 |
"ON #{Attachment.table_name}.container_type='Version' " \ |