-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: get reports api performance tuning #499
Conversation
4ee4b12
to
c001ca1
Compare
Quality Gate passed for 'Pay Transparency backend-external'Issues Measures |
Quality Gate passed for 'Pay Transparency Frontend'Issues Measures |
Quality Gate passed for 'Pay Transparency doc-gen-service'Issues Measures |
Quality Gate failed for 'Pay Transparency Backend'Failed conditions |
Description
The custom raw query returned lots of data that needed to be transformed and formatted to the required API response shape. This approach was causing performance issues. This fix uses SQL views to create a union of the
pay_transparency_report
andreport_history
and another view that creates a union of thecalculated_data
andcalculated_data_history
.Prisma has a functionality to include SQL views in the schema, allowing us to join the two views making the queries faster.
Fixes # (issue)
https://finrms.atlassian.net/wiki/spaces/GEO/pages/143687718/Database+Design#Database-views
Type of change
Checklist
Further comments
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in:
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: