Hello! I remember seeing a post somewhere about increasing the performance of RLS by improving the performance of the queries, and it went something like this with joins:
Bad:
using ((select auth.uid()) in ( select user_id from public.access_control where role = 'admin'))
using ((select auth.uid()) in ( select user_id from public.access_control where role = 'admin'))
Good:
using ( select user_id from public.access_control where user_id = (select auth.uid()) and role = 'admin'))
using ( select user_id from public.access_control where user_id = (select auth.uid()) and role = 'admin'))
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.