P
Prisma6mo ago
la flame

Prisma(postgres) stuck at `where: {assets: {none: {}}}`

I understand that the query is tight. But isn't there a way to do it? I have only ~1m records in assets. My goal is to get entity where assetsCount = 0(without raw queries); For example this query works lightning fast.
SELECT "entityId", COUNT(*) AS "count" FROM "Asset" GROUP BY "entityId" ORDER BY count;
SELECT "entityId", COUNT(*) AS "count" FROM "Asset" GROUP BY "entityId" ORDER BY count;
I'm asking if I'm doing things wrong or over-complicated. I'm not count this as prisma problem:heart:
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server