Just want to ask how you guys doing with a supabase running as your backend. I’m also using this septup. Just curious how you handle large data in terms of fetching calling data link or foreign? Sometimes, my app is snapping due to high memory cost by api fetching.
Any tips and suggestions on what’s the best approach especially when handle a lot or records and columns.
My team and I use Supabase across a few Bubble applications, where WU usage and performance (mostly due to groupings/joins, or a non-normalised DB) become a major issue.
A few thoughts:
No need to fetch data using the API connector (unless, ofc, it’s needed to be that way). If RLS is set up correctly, fetching client-side is simpler and cheaper (no WUs for data fetching). For this, I’ve built this plugin that uses their JS SDK
Never fetch full tables - always paginate
Use limit + offset or keyset pagination (.gt(), .lt()) on indexed columns.
Don’t expand foreign relations in the same query
Select only the fields Bubble actually uses
One of the main reasons I like SB is that you can specify columns you wish to return instead of the entire schema. That way, you can ensure your DB is normalised without needing workarounds typical in Bubble’s built-in DB
Add proper indexes on Supabase
If you filter by user_id, status, created_at, etc, create indexes on those columns.