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

Query determining latest channel revision needs help #4825

Closed
bjester opened this issue Nov 15, 2024 · 1 comment
Closed

Query determining latest channel revision needs help #4825

bjester opened this issue Nov 15, 2024 · 1 comment

Comments

@bjester
Copy link
Member

bjester commented Nov 15, 2024

Observed behavior

The following query has significant query times in production, ranging from minimum of 0.5 seconds to 86 seconds over the last 7 days. We may want to evaluate similar queries in the sync endpoint.

SELECT
  "contentcuration_change"."server_rev"
FROM
  "contentcuration_change"
WHERE
  ("contentcuration_change"."applied"
    AND "contentcuration_change"."channel_id" = '<channel_id>')
ORDER BY
  "contentcuration_change"."server_rev" DESC
LIMIT
  1;

Expected behavior

The query is executed when loading the channel edit page, here.

User-facing consequences

Users may run into 502 timeout errors when attempting to open a channel.

Errors and logs

Image

Additional information

https://learningequality.slack.com/archives/C0LK8QS9J/p1731706062874869

@rtibbles
Copy link
Member

Fixed in #4826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants