fix(db): add missing Review.userId index for FK query performance
The Review table was missing an index on userId, causing full table scans when querying reviews by user. All other FK columns across 22 models were verified to have proper indexes already (including Listing.sellerId which was added in a prior migration). Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -567,4 +567,5 @@ model Review {
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([targetType, targetId])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user