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

Use single SQL statement to fetch additional data in decorators #3629

Merged

Conversation

philippthun
Copy link
Member

@philippthun philippthun commented Feb 6, 2024

This reduces the number of queries and the amount of data fetched from the database.

  • 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

- This reduces the number of queries (1 instead of n * 3).
- This reduces the amount of data fetched from the database (n brokers
  with only name and guid fields populated instead of n service plans +
  services + service brokers).
- This reduces the number of queries (1 instead of n * 2).
- This reduces the amount of data fetched from the database (n services
  with selective fields instead of n service plans + services).
Copy link
Contributor

@johha johha left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@philippthun philippthun merged commit cef490c into cloudfoundry:main Feb 9, 2024
8 checks passed
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