Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #12107] Add missing index on state history for DB IDO cleanup #4349

Closed
icinga-migration opened this issue Jul 6, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Jul 6, 2016

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12107

Created by mfriedrich on 2016-07-06 09:56:10 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-07-06 10:20:04 +00:00)
Target Version: 2.5.0
Last Update: 2016-07-06 10:20:04 +00:00 (in Redmine)

Icinga Version: 2.4.10
Backport?: Not yet backported
Include in Changelog: 1

CREATE INDEX idx_statehistory_cleanup on icinga_statehistory(instance_id, state_time);

The mysql query optimiser will decide upon the given comparison (state_time > $datetime) whether an index or a full table scan is required. Currently the DELETE operations from inside the IDO feature depends on a proper index.

http://stackoverflow.com/questions/18297509/mysql-index-on-timestamp-column-not-used-for-large-date-ranges

Changesets

2016-07-06 10:17:41 +00:00 by mfriedrich a0a5989

Add missing index on statehistory table for DB IDO cleanup

fixes #12107
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2016

Updated by mfriedrich on 2016-07-06 10:06:03 +00:00

  • Description updated
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2016

Updated by mfriedrich on 2016-07-06 10:20:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset a0a5989.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.