Bug #10228
logs table needs index on source_id
Pull request:
Fixed in Releases:
Found in Releases:
Description
Without an index on source_id in the logs table the cron job for reports:expire takes several minutes, locks tables, and prevents Foreman from responding to ENC requests.
Adding an index eliminates all the above and reports:expire runs lickety split.
See discussion at: https://groups.google.com/forum/#!topic/foreman-dev/kBz1fjSIpeQ
Workaround (MySQL):
ALTER TABLE `logs` ADD INDEX `index_logs_on_source_id` (`source_id`);
Associated revisions
Fixes #10228 - adding index to source_id in logs table
(cherry picked from commit bd3a90f03d950daa963f9ab099b7c09e9f3fbc95)
History
#1
Updated by Dominic Cleal about 7 years ago
- Category set to Database
- Difficulty set to easy
#2
Updated by The Foreman Bot about 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2326 added
- Pull request deleted (
)
#3
Updated by Aaron Stone about 7 years ago
Is #10053 the same as this?
#4
Updated by Dominic Cleal about 7 years ago
- Assignee set to Ondřej Pražák
- Legacy Backlogs Release (now unused) set to 50
Commented on the other ticket, but I don't think so.
#5
Updated by Ondřej Pražák about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset bd3a90f03d950daa963f9ab099b7c09e9f3fbc95.
Fixes #10228 - adding index to source_id in logs table