SupabaseS
Supabase6mo ago
Yifan

Are RPC Scaleable?

Hey Guys!

We have a graph section needs to fetch data from the DB and we currently do all the processing and return data that's ready to be used in frontend. Currently our rpc are searching through 3 tables of max 700k-1M rows and returning max 1k rows of data. The current rpc latencies we have are around 300-700ms. We are also using indexing to try to improve speed.

Questions:
Wondering if this would scale if we had 50M+ rows in our tables and need to process and return 50k rows or more data would the rpc processing time scale linearly?

Are there anything we could do to decrease latency currently or in the future?

Also wondering if you guys would recommend doing materialized view?

Thank you so much!
Was this page helpful?