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

Add db indexes to user table #3067

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Add db indexes to user table #3067

merged 3 commits into from
Sep 27, 2023

Conversation

matiasb
Copy link
Contributor

@matiasb matiasb commented Sep 26, 2023

Add composite indexes based on existing queries/usage, ensuring partial index prefixes are useful too.

  • is_active filtering is set in the default User manager
  • most of our user queries are per organization
  • multiple cases filter by username or email (most notably schedule related queries, given the low-level backend ical representation)

Also rework how users are fetched from DB when getting users from schedules ical representation (which was particularly slow when regex filtering by required permission).

Related to https://github.com/grafana/oncall-private/issues/2163

@matiasb matiasb added pr:no changelog pr:no public docs Added to a PR that does not require public documentation updates labels Sep 26, 2023
@matiasb matiasb force-pushed the matiasb/add-user-indexes branch from e097f21 to 563cd74 Compare September 26, 2023 22:06
@matiasb matiasb marked this pull request as ready for review September 26, 2023 22:54
@matiasb matiasb requested a review from a team September 26, 2023 22:54
@matiasb matiasb added this pull request to the merge queue Sep 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 27, 2023
@matiasb matiasb added this pull request to the merge queue Sep 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 27, 2023
@matiasb matiasb force-pushed the matiasb/add-user-indexes branch from 6b06ac5 to d08773c Compare September 27, 2023 12:27
@matiasb matiasb added this pull request to the merge queue Sep 27, 2023
Merged via the queue into dev with commit bba6eb3 Sep 27, 2023
@matiasb matiasb deleted the matiasb/add-user-indexes branch September 27, 2023 12:41
@Red-M Red-M mentioned this pull request Oct 3, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants