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

Optimize ServiceInstanceListFetcher #4223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philippthun
Copy link
Member

@philippthun philippthun commented Feb 19, 2025

Reduce the overall query complexity by fetching instances and shared instances separately. Apply filters (e.g. for readability) to each dataset instead of JOINing them and having multiple WHERE conditions. UNION the two datasets to get the final result set.

On large foundations this reduces the query execution time from multiple 100ms to less than 100ms.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@philippthun philippthun marked this pull request as ready for review February 25, 2025 13:34
Reduce the overall query complexity by fetching instances and shared
instances separately. Apply filters (e.g. for readability) to each
dataset instead of JOINing them and having multiple WHERE conditions.
UNION the two datasets to get the final result set.

On large foundations this reduces the query execution time from multiple
100ms to less than 100ms.
@philippthun philippthun force-pushed the service-instance-list-fetcher-union branch from 344abca to c9163a4 Compare February 25, 2025 13:42
Copy link
Contributor

@kathap kathap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants