Skip to content

Add more indicies for better performance #5

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

Merged
merged 2 commits into from
Apr 28, 2025
Merged

Conversation

billsedison
Copy link
Collaborator

No description provided.

@@index([committed]) // Index for filtering by committed status
@@index([submissionId]) // Index for filtering by submission
@@index([resourceId]) // Index for filtering by resource (reviewer)
@@index([id]) // Index for direct ID lookups

Choose a reason for hiding this comment

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

The index on the id field might be redundant if id is already the primary key, as primary keys are indexed by default. Consider verifying if this index is necessary.

@@ -230,6 +254,10 @@ model appealResponse {
updatedBy String

appeal appeal @relation(fields: [appealId], references: [id], onDelete: Cascade)

@@index([id]) // Index for direct ID lookups

Choose a reason for hiding this comment

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

The index on id may not be necessary if id is already a primary key, as primary keys are indexed by default. Consider removing this index if id is indeed the primary key.


@@index([id]) // Index for direct ID lookups
@@index([appealId]) // Index for joining with appeal table
@@index([resourceId]) // Index for filtering by resource (responder)

Choose a reason for hiding this comment

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

Ensure that the resourceId field is frequently used in queries for filtering. If not, this index might not provide significant performance benefits and could be removed to save on storage and maintenance costs.

@jmgasper jmgasper merged commit 452c935 into develop Apr 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants