Slow SQL Instance Queries with Large Jobs Table #1353
Labels
Backlog
Issue to be scheduled for addressing
Bug
Something's fucky
HTTP API
The JSON Web API that controls the server
Migration
Requires or performs a database migration
Reproduction Required
Reproduction steps required for issue
Milestone
Describe the bug
Queries for details on server instances take a significant (>10 seconds) amount of time to complete.
Relevant slow queries log from MariaDB in logs section
Issue seems to be related to the ordering of the JOIN modifiers. I've had a similar issue when working with nfreader's statbus. The largest tables should be joined last to minimize processing, as joining large tables first expands the internal query table massively, creating processing delays for later joins, even if everything is eventually condensed for return.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The queries take a minimal amount of time to execute and the control panel is snappy when loading instance details. Workaround is manually clearing out the jobs table, but this is only a temp fix.
Logs
Server State: (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: