-
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
RAS-1400 use native sql #450
Conversation
/deploy scorfs |
Deploying to dev cluster with following parameters:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the code and works as expected. The acceptance tests pass. I like this approach. It's more streamlined. Approved.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with the current improvements and have discussed progressing the outstanding comments at a later date.
What and why?
The code in the model https://github.com/ONSdigital/ras-party/blob/main/ras_party/models/models.py#L40 will force join the attributes table, due to how we create business attributes for every individual sample entry, means there are literally thousands for some businesses. Because of that if we attempt any join using the Business model it will overwork and produce an excessive performance hitting amount of joins. This PR sides steps the model and creates a pure SQL of exactly what we want
How to test?
Create enrolments for different CE's and make sure when you log in the correct information is displayed on the todo list. You can use acceptance-tests, but I would add another enrolled to them and possible another CE
Jira