Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐌 Fix performance regression causing Purdue.io front-end timeouts (#67)
Recently the Purdue.io front-end started showing timeouts when browsing the Class list page for a particular Course. Investigation revealed expensive SQL queries being generated, taking upwards of a minute to complete. Analysis revealed this section was contributing most of the cost of the query, requiring sequential evaluation of rows from disk: ```sql SELECT t8."Id", t8."Email", t8."Name", t8."MeetingId", t8."InstructorId" FROM ( SELECT i."Id", i."Email", i."Name", m0."MeetingId", m0."InstructorId", ROW_NUMBER() OVER(PARTITION BY m0."MeetingId" ORDER BY i."Id") AS row FROM "MeetingInstructor" AS m0 INNER JOIN "Instructors" AS i ON m0."InstructorId" = i."Id" ) AS t8 WHERE t8.row <= $7 ``` Further investigation revealed that this was due to pagination logic being applied to the `$expand` operation. An issue is open with a similar repro here: OData/AspNetCoreOData#1041 The pagination logic was being applied due to the recent change #65. This PR reverts that change to fix the performance regression until a workaround is provided by the OData library.
- Loading branch information