Skip to content

Query determining latest channel revision needs help #4825

Closed

Description

@bjester

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

Activity

  1. self-assigned this
    on Nov 15, 2024
  2. rtibbles commented on Nov 15, 2024

    @rtibbles
    Member

    Fixed in #4826

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions