yahya
yahya
Explore posts from servers
TTCTheo's Typesafe Cult
Created by yahya on 5/30/2024 in #questions
Files wouldn't upload, no errors
No description
5 replies
PPrisma
Created by yahya on 5/14/2024 in #help-and-questions
Super slow queries when filter JSON
Hello, I asked the same question to @kapa.ai but couldn't figure out what to do basically my queries are super slow when running filters on raw JSON values with postgresql should I switch to mongodb?
await prisma.dataEntry.findMany({
where:{ ...,
AND: [
{
raw: { path: [key], not: "" },
},
{
raw: { path: [key], not: Prisma.DbNull },
},
{
raw: { path: [key], not: Prisma.JsonNull },
},
]
},
...
})
await prisma.dataEntry.findMany({
where:{ ...,
AND: [
{
raw: { path: [key], not: "" },
},
{
raw: { path: [key], not: Prisma.DbNull },
},
{
raw: { path: [key], not: Prisma.JsonNull },
},
]
},
...
})
model DataEntry {
id String @id @default(cuid())

raw Json

upload DataUpload @relation(fields: [uploadId], references: [id], onDelete: Cascade)
uploadId String
users User[]

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model DataEntry {
id String @id @default(cuid())

raw Json

upload DataUpload @relation(fields: [uploadId], references: [id], onDelete: Cascade)
uploadId String
users User[]

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
what can I do?
1 replies