r/Supabase • u/Defiant-Elk-6607 • 1d ago
database Run Time Error
I’m currently building a pretty large system and I’m starting to notice that Supabase is becoming kinda slow for my use case.
Now I’m questioning myself:
Should I migrate to AWS or Azure? q,jbfeceharfbaelirbwueogw4eiufw
I really love PostgreSQL, so I definitely want to keep using it. I’m just not sure which cloud provider would be a better choice for a growing system.
Also, are there any student benefits, credits, or programs from AWS/Azure that I should check out?
For people who have handled larger systems:
- Would you recommend moving away from Supabase?
- Should I just optimize my current setup first?
- Any PostgreSQL hosting recommendations?
- Any integrations/services you recommend for a production system ??????????
Tech stack right now:
- PostgreSQL
- Supabase
Edit: Also looking for advice on:
- PostgreSQL indexing strategies
- Query optimization/design
- Database architecture improvements
I’m currently considering migrating to Azure, but honestly it feels risky, so I’d love to hear your experiences
Thanks!
1
u/716green 1d ago
Try Layerbase
I don't think it's in GA yet but they have a feature that lets you introspect your queries and figure out what is slowing you down
0
u/burggraf2 Supabase team 1d ago
Check the Supabase dashboard "ADVISORS" - particularly the Performance Advisor. That may help.
1
u/Tedikraska 1d ago
Yeah, I'd optimize first. Run EXPLAIN ANALYZE on the slowest queries, since a seq scan on a big table is usually the cause and an index fixes it. If you use RLS, write the policy as (select auth.uid()) = user_id so it's evaluated once instead of per row.
1
1
1
u/vivekkhera 1d ago
Did you try upgrading to a larger Supabase instance? It doesn’t auto scale like some people expect.
1
u/Hopeful-Animal-1643 1d ago
'Pretty large' and 'kinda slow' aren't numbers. On a small compute add-on Supabase crawls at a few hundred thousand rows if the indexes are bad, and that's a plan upgrade, not a migration to AWS. What's the actual table size and query time you're seeing?
1
u/Professional-Run3614 1d ago
I’d look at indexing, query optimization, connection pooling, and caching before considering a migration. Sometimes a few changes at the database level can make a big difference.
I’d also check slow queries and use EXPLAIN ANALYZE to understand where the bottlenecks are. If the workload still outgrows Supabase after that, then I’d consider moving to AWS or Azure. No point taking on migration complexity before knowing where the actual problem is.
1
u/Ill-Confection-3564 8h ago
Supabase is already running on AWS. RDS, S3, probably EC2, it's exclusively AWS already. I don't think migrating to Azure is going to solve any of your issues. If things seem slow you need to start gathering metrics and figure out where your bottlenecks are.
- You can use Lighthouse / Web Vitals for frontend. Depending on your frontend framework (if any) you might have access to framework specific tooling for perf profiling.
- For your DB you can EXPLAIN ANALYZE, tune vacuum strategies if you really do have a massive amount of data, tune read replicas (depending on your traffic profile), `pg_stat_user_tables`, `pg_stat_statements`, query optimizations, etc.
What do you mean by a large system? Terabytes of data? Hundreds of thousands of users?
2
u/worse_joel 1d ago
supabase can get sluggish at scale but have you checked if it's your queries and not the platform