You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This query is timing out and needs optimization work. According to the planner the query is using the partial index on lifecycled_at IS NULL and when run without analyze the query planner stats look good. Running with analyze is very slow.
We could limit the scope of the table to look for using a known end point in the table (classification.id) that we've lifecycled all the records up to. We could compute a last known lifecycled id offset without forcing a full scan of the table, perhaps every hour (or as part of this worker job) and store this in a db record for future use.
The text was updated successfully, but these errors were encountered:
Another option is to run this query on the db replica and ensure the worker returns quickly if the classification is already lifecycled (replica is behind primary).
https://github.com/zooniverse/Panoptes/blob/00cd74003b99458447feb0442b87e1b5e5e32c79/app/workers/requeue_classifications_worker.rb#L24
This query is timing out and needs optimization work. According to the planner the query is using the partial index on
lifecycled_at IS NULL
and when run without analyze the query planner stats look good. Running with analyze is very slow.We could limit the scope of the table to look for using a known end point in the table (classification.id) that we've lifecycled all the records up to. We could compute a last known lifecycled id offset without forcing a full scan of the table, perhaps every hour (or as part of this worker job) and store this in a db record for future use.
The text was updated successfully, but these errors were encountered: