Skip to content

Faster user repos listing

Warren Gifford requested to merge core/faster-user-repos-queries into main

Created by: tsenart

This PR denormalizes the namespace_user_id in external_services, by adding it to external_service_repos too. As described in https://github.com/sourcegraph/sourcegraph/issues/19561#issuecomment-811031184, avoiding the join with external services should completely bypass the problem.

@ryanslade @asdine: I chose to fill in the user_id via SQL join with external_services in the queries, instead of passing that value in from application code. The change would be much larger if we did that change in application code, and I didn't feel comfortable with it. Maybe we should do it though? This "Sources" code is a bit hard to reason about, compared to the database schema itself.

Fixes #19561 (closed)

Merge request reports

Loading