Bug 1297616 - [SLOW QUERY] beaker-usage-reminder: reservations expiring soon
Summary: [SLOW QUERY] beaker-usage-reminder: reservations expiring soon
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-12 02:49 UTC by Dan Callaghan
Modified: 2021-01-29 22:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-29 18:45:59 UTC


Attachments (Terms of Use)

Description Dan Callaghan 2016-01-12 02:49:32 UTC
Count: 49435  Time=0.00s (241s)  Lock=0.00s (3s)  Rows_sent=0.5 (22722), Rows_examined=2234.0 (110439488), beaker[beaker]@localhost
  SELECT watchdog.kill_time AS watchdog_kill_time, recipe_resource.fqdn AS recipe_resource_fqdn 
  FROM recipe INNER JOIN recipe_set ON recipe_set.id = recipe.recipe_set_id INNER JOIN job ON job.id = recipe_set.job_id INNER JOIN watchdog ON recipe.id = watchdog.recipe_id INNER JOIN recipe_task ON recipe_task.id = watchdog.recipetask_id INNER JOIN recipe_resource ON recipe.id = recipe_resource.recipe_id 
  WHERE job.owner_id = N AND (N = recipe_task.task_id OR recipe.status = 'S') AND watchdog.kill_time <= 'S'

Add an index on watchdog.kill_time. It makes a small difference in the query plan according to EXPLAIN (although maybe not enough to satisfy log_queries_not_using_index).

Comment 2 Carol Bouchard 2021-01-29 18:45:59 UTC
This bug also lacks much for description of what they want.


Note You need to log in before you can comment on or make changes to this bug.