#Extremely slow queries

21 messages · Page 1 of 1 (latest)

olive ruin
#

I'm having elapsed time of 3 to 7 seconds and I just switched from mongo to postgres. Is it the DB location? I'm hosting this app on render and using their postgres DB also takes really long. Supabase takes about the same time, any clue??

haughty finch
olive ruin
#

supabase takes the same time

#

i'm also queying all products which is just 1 prod

#

i have another app in next 14 and using prisma+postgres+supabase takes around 2-3 sec to the getAll type of queries

haughty finch
olive ruin
#

you mean 2-3 sec is normal?

#

mongo was super fast

haughty finch
olive ruin
#

it takes around 3-4 secs to delete it

#

i didn't have any optimization for mongo, just as it looks in the pic too

#

so i noticed something strange, when i switched from nosql to sql and generated the zod types for the first time(a prisma generator), but specially, the trpc "inputTypes"

#

the server started fast, as usual, but, the 2nd time i started it, it took really long and didn't fix it self or something from now it always takes like 20 sec to start if i create those types, so i stopped creating them. I suspect I have some sort of bug, it can't take so long to query

#

my prisma schema is 260 lines long

haughty finch
#

Well, i'm not sure. If your database is huge, it can explain the time

haughty finch
brisk jewel