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
Labels
area/db-ido Database output bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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
Copy link
Author

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

  • Description updated

@icinga-migration
Copy link
Author

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.

@icinga-migration icinga-migration added bug Something isn't working area/db-ido Database output labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.5.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-ido Database output bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant