Tyler Benfield
Tyler Benfield
PPrisma
Created by Sabin Adams on 8/14/2024 in #help-and-questions
Pulse Type
A lot of the docs and integrations seemed out of date
Prisma docs or database vendor docs?
16 replies
PPrisma
Created by oliver bagin on 8/15/2024 in #help-and-questions
Prisma gets very slow...
Hi @oliver bagin 👋 Just taking a quick look over your schema and the execution plan, it looks like you need to add another index for @@index([venueId, timeStamp]) . Index columns are utilized left-to-right. Sorting can utilize the index as long as all fields left of the sorted field are included in the where. So in this case, @@index([timeStamp, venueId]) doesn't match because there is no filter on timeStamp . This causes the database to prefer opening_hour_venue_id_idx for filtering, though that doesn't have the timeStamp and needs to perform sorting in memory. The order of the fields makes a surprisingly big difference!
3 replies
PPrisma
Created by justinhandley on 8/15/2024 in #help-and-questions
Understanding Prisma Pulse
Hi @justinhandley 👋 What is powering the resolver for you Apollo subscriptions? That's a perfect fit for Prisma Pulse in many apps. The Pulse APIs return objects that implement AsyncIterator, which is exactly what Apollo expects as a subscription resolver. You can use Pulse to subscribe to database changes combined with Apollo to deliver those changes to the frontend.
4 replies
PPrisma
Created by Sabin Adams on 8/14/2024 in #help-and-questions
Pulse Type
The ReturnType approach is my go-to for getting the type of any extended Prisma Client. Let us know what you think of Pulse 😉
16 replies