Howdy, I have a user model that I frequently search on with where {}. I wanted to improve performance and read about indices with postgresql. I found that this is a preview feature on the docs, but my handy AI assistant claims I can just do this:
model User { id Int @id @default(autoincrement()) firstName String lastName String // ... other fields ... @@index([firstName]) @@index([lastName])}
model User { id Int @id @default(autoincrement()) firstName String lastName String // ... other fields ... @@index([firstName]) @@index([lastName])}
Does this work out of the box? Will this create an index for those fields in my postgres db and improve performance?