-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
perf: Improve routing insights view #18557
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add foundation team as reviewer" took an action on this PR • (01/09/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (01/09/25)1 label was added to this PR based on Keith Williams's automation. |
b."createdAt" as "bookingCreatedAt", | ||
b."startTime" as "bookingStartTime", | ||
b."endTime" as "bookingEndTime", | ||
(SELECT |
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.
This subquery is the fix I referenced in the description.
This was a CTE before that couldn't reference b.id
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.
(SELECT | ||
json_agg( | ||
json_build_object( | ||
'name', a.name, 'timeZone', a."timeZone", 'email', a.email | ||
) | ||
) | ||
FROM "Attendee" a | ||
WHERE "a"."bookingId" = b.id | ||
) as "bookingAttendees", |
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.
👨🍳
E2E results are ready! |
What does this PR do?
This view is experiencing some bad performance because the Attendee table has quite a lot of records. Instead of using a prefilled CTE, this moves the select into a subquery so we can directly reference the booking record instead, greatly improving perf.
Mandatory Tasks (DO NOT REMOVE)