Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .server-changes/narrow-metric-environment-lookup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: improvement
---

Dashboard charts load with less database work behind the scenes
3 changes: 2 additions & 1 deletion apps/webapp/app/services/queryService.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ export async function executeQuery<TOut extends z.ZodSchema>(
});

const environments = await prisma.runtimeEnvironment.findMany({
where: { project: { organizationId } },
// Same set as filtering through `project`, but hits the indexed column without the join.
where: { organizationId },
select: { id: true, slug: true },
});

Expand Down
Loading