Skip to content

Optimize queries #405

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

Merged
merged 7 commits into from
Nov 12, 2021
Merged

Optimize queries #405

merged 7 commits into from
Nov 12, 2021

Conversation

yhabteab
Copy link
Member

resolves #404

@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Oct 26, 2021
@yhabteab yhabteab force-pushed the query-optimization branch 6 times, most recently from 03b29cb to 4984f68 Compare October 28, 2021 14:49
@yhabteab yhabteab self-assigned this Oct 28, 2021
@yhabteab yhabteab force-pushed the query-optimization branch 3 times, most recently from e5cef37 to f00246b Compare November 2, 2021 16:12
@yhabteab
Copy link
Member Author

yhabteab commented Nov 2, 2021

Blocked by Icinga/icinga2#9049

@yhabteab yhabteab marked this pull request as ready for review November 2, 2021 16:13
@yhabteab yhabteab requested review from nilmerg and removed request for nilmerg November 2, 2021 16:35
@yhabteab yhabteab force-pushed the query-optimization branch 3 times, most recently from 3a3203e to 9cd2350 Compare November 5, 2021 16:40
@yhabteab
Copy link
Member Author

yhabteab commented Nov 5, 2021

Needs just to be tested properly after these PRs are merged.
Icinga/icinga2#9061
Icinga/icingadb#403
Icinga/icingadb#397

@lippserd lippserd changed the title Optimize used Queries Optimize queries Nov 12, 2021
yhabteab and others added 6 commits November 12, 2021 13:02
Since `n` is the default value for enums, asc would display
ineffective downtimes first.

Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Simultaneous sorting by `host.display_name` and
`service.display_name` and vice versa prevents the use of the
display_name indexes.

Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Otherwise, MySQL won't utilize the event_time index.

Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Otherwise, MySQL will not use indexes on the state tables when
filtering / sorting the views by columns from the state tables.

Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
@lippserd
Copy link
Member

Despite Icinga/icingadb#397 not being merged yet, this one is ready to review.

@lippserd lippserd requested a review from nilmerg November 12, 2021 15:16
@nilmerg nilmerg merged commit 8d6a8a5 into master Nov 12, 2021
@nilmerg nilmerg deleted the query-optimization branch November 12, 2021 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance of Icinga DB WEB Query & hints
3 participants