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 log table #1330

Merged
merged 3 commits into from
Jun 8, 2020
Merged

Conversation

jtpalmer
Copy link
Contributor

@jtpalmer jtpalmer commented Jun 5, 2020

Description

Adds a new index to themod_logger.log_table database table.

Motivation and Context

This index is intended to improve the performance of the queries used in the internal dashboard "Log Data" panels. They are of the form:

SELECT id, logtime, priority, message
FROM log_table
WHERE ident = 'xdmod-shredder'
AND priority IN ('0','1','2','3','4','5','6','7')
AND logtime >= '2020-05-29 00:00:00'
AND logtime <= '2020-06-04 23:59:59';

The existing indexes don't include the logtime column.

Tests performed

Tested manually. (See https://metrics-dev.ccr.buffalo.edu/internal_dashboard/)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jtpalmer jtpalmer added enhancement Enhancement of the functionality of an existing feature Category:Internal Dashboard Internal Dashboard labels Jun 5, 2020
@jtpalmer jtpalmer added this to the 9.0.0 milestone Jun 5, 2020
@jtpalmer jtpalmer requested review from plessbd and jpwhite4 June 5, 2020 12:02
plessbd
plessbd previously approved these changes Jun 5, 2020
@jtpalmer jtpalmer merged commit 7ebc0cc into ubccr:xdmod9.0 Jun 8, 2020
@jtpalmer jtpalmer deleted the add-log_table-index branch June 8, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Internal Dashboard Internal Dashboard enhancement Enhancement of the functionality of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants