Project

General

Profile

Actions

Bug #10228

closed

logs table needs index on source_id

Added by Roger Spencer about 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
Difficulty:
easy
Triaged:
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`);

Actions #1

Updated by Dominic Cleal about 9 years ago

  • Category set to Database
  • Difficulty set to easy
Actions #2

Updated by The Foreman Bot almost 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2326 added
  • Pull request deleted ()
Actions #3

Updated by Aaron Stone almost 9 years ago

Is #10053 the same as this?

Actions #4

Updated by Dominic Cleal almost 9 years ago

  • Assignee set to Ondřej Pražák
  • translation missing: en.field_release set to 50

Commented on the other ticket, but I don't think so.

Actions #5

Updated by Ondřej Pražák almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF