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

Add index to mod_logger.log_table for help with better query planning #1582

Merged
merged 3 commits into from
Dec 14, 2021

Conversation

eiffel777
Copy link
Contributor

Adding this index help the query planner to pick the correct index for sql queries that are trying to find the most recent run of a value in the ident column in the mod_logger.log_table. An example query is below.

SELECT id, logtime, priority, message FROM log_table WHERE ident = 'xdmod-ingestor' AND priority = '5' AND message LIKE '%\"process_start_time\":%' ORDER BY id DESC LIMIT 1

This index has been added to metrics-dev

Tests performed

Tested in docker, metrics-dev, and metrics-staging

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@eiffel777 eiffel777 added enhancement Enhancement of the functionality of an existing feature Category:General General labels Dec 13, 2021
@eiffel777 eiffel777 added this to the 10.0.0 milestone Dec 13, 2021
@eiffel777 eiffel777 self-assigned this Dec 13, 2021
@eiffel777 eiffel777 merged commit 0a4d5bf into ubccr:xdmod10.0 Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:General General enhancement Enhancement of the functionality of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants