Optimize performance of courses/instructors by using materialized views, where each view is built using a query that performs JSON aggregation on the DBMS.
Also modify the WebSoc scraper to update the materialized view every time it completes a scrape.
How Has This Been Tested?
Benchmarked locally with Postman, see screenshot.
The numbers are an apples-to-apples comparison when tested locally so in production it will definitely be higher, but should still be a pretty significant improvement since we've also cut down on the number of round trips.
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code involves a change to the database schema.
[ ] My code requires a change to the documentation.
Description
Optimize performance of courses/instructors by using materialized views, where each view is built using a query that performs JSON aggregation on the DBMS.
Also modify the WebSoc scraper to update the materialized view every time it completes a scrape.
How Has This Been Tested?
Benchmarked locally with Postman, see screenshot.
The numbers are an apples-to-apples comparison when tested locally so in production it will definitely be higher, but should still be a pretty significant improvement since we've also cut down on the number of round trips.
Screenshots (if appropriate):
Types of changes
Checklist: