Ok I understand. Im just looking for a high level ...
# sql
i
Ok I understand. Im just looking for a high level opinion to see what is more manageable and scalable.
s
Both are manageable and scalable, It's down to your project use case and your personal preference. Btw you haven't stated what your use case is or how you intend to leverage any of these two projects
To better help with your question, what are you trying to build?
i
Ok, here is my usecase. I will be storing different games scores and fetching rank of the record. Consider each game has million scores, and there are 100 games, Its like 100M records saved in the database. However I won't be doing any query among all records but only per game. So target records search will be around 1M records (i assume this can be handled with sharding with gameId as key)
And also note that I'm on serverless tech (Cloud functions and Cloud Run) - Just to make you aware that db connections is another variable to consider.
Please let me know if you need further information
s
IMO: It comes down to how much control you want, how much of ops required is with the alternatives and whether you see value in other features supabase has to offer. With the amount of data you will end up having to store, you will most likely end up getting to pay for what ever database option you choose, I think supabase works out cheaper with more straightforward payment plans. Plus there's still all these other features, again. i.e. seamless auth
i
Yea, right. Right now I don't see any use-case for using other than database though.
s
In such a case, you have to compare pricing plans and how much control/responsibility either option gives you.
i
Ok. I will do a benchmark then. Thanks for jumping in and also to @User 🙂
s
I was self hosting everything I had a postgres instance, a nestjs backend and nuxt as my front end, after discovering supabase, I deleted my nestjs project and rewrote logic to my front end, row level security and server-middleware. I came for a managed database instance, ended up going for the whole ecosystem
i
supabase is quite good and would be more interesting if I have functions too soon. I totally understand the need for a managed database. Also I need callback triggers if data changes (webhooks will do fine too). Is it possible with supabase db?
s
At this point, I doubt. But if you wanted to achieve this with postgres alone, you'd have to make use of the http extention to hit an endpoint on a trigger, which supabase supports so that's one way
i
Oh, is the trigger func something built into postgres? I was thinking Hasura manages to trigger it. I could be wrong then.
s
Yes, also, you can use any supabase client to subscribe to events from the db, but this is useful for long lived apps or events explicit subscriptions i.e. new message in a chat app
i
Thanks @User I will check it out