Skip to content

perf: Add index to EventType for parentId#17049

Merged
PeerRich merged 1 commit intomainfrom
perf/event-type-index-parent-id
Oct 10, 2024
Merged

perf: Add index to EventType for parentId#17049
PeerRich merged 1 commit intomainfrom
perf/event-type-index-parent-id

Conversation

@keithwillcode
Copy link
Copy Markdown
Contributor

What does this PR do?

We run lots of queries that filter by the parentId column in the EventType table, resulting in Seq Scans. We can improve read perf by having this index.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Ensure the migration runs fine on qa/prod
  • Analyze query performance before/after

@keithwillcode keithwillcode self-assigned this Oct 10, 2024
@graphite-app graphite-app Bot requested a review from a team October 10, 2024 17:24
@github-actions github-actions Bot added the ❗️ migrations contains migration files label Oct 10, 2024
@keithwillcode keithwillcode added core area: core, team members only foundation labels Oct 10, 2024
@dosubot dosubot Bot added the performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive label Oct 10, 2024
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Oct 10, 2024

Graphite Automations

"Add foundation team as reviewer" took an action on this PR • (10/10/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (10/10/24)

1 label was added to this PR based on Keith Williams's automation.

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Oct 10, 2024 5:27pm
calcom-web-canary ⬜️ Ignored (Inspect) Oct 10, 2024 5:27pm

Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PeerRich PeerRich enabled auto-merge (squash) October 10, 2024 17:40
@PeerRich PeerRich merged commit ef88eff into main Oct 10, 2024
@PeerRich PeerRich deleted the perf/event-type-index-parent-id branch October 10, 2024 17:46
@github-actions
Copy link
Copy Markdown
Contributor

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only foundation ❗️ migrations contains migration files performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants