Hi Guys,
I'm on free plan on supabase with small database. I create a Postgres function retrieving last value data for a table and have relatively good performance over SQL Editor (RLS is introcuing latency and I'll work on this one later to simplify), see query plan below :
<img width="736" height="178" alt="image" src="https://github.com/user-attachments/assets/62941f1e-9371-42c1-819e-cd55ee192f92" />But over Data API, when I cal this RPC function, I have terrible perfomance varying between 1,7s to 7s and even sometimes hitting the request timeout...
How performance can be so degraded over Data API ? Is there a way to debug where time is consumed ?
Thanks
The user is experiencing degraded performance when calling a Postgres function via the Data API compared to using the SQL Editor. They report significant latency and request timeouts, with performance varying widely. They are seeking ways to debug and understand the cause of this performance issue.
Query performance called from website is 4000ms average:
<img width="1990" height="72" alt="image" src="https://github.com/user-attachments/assets/9be85878-4148-44b3-91af-bafbe44bf0fb" />Same method called from Postman 340ms :
<img width="1978" height="80" alt="image" src="https://github.com/user-attachments/assets/2c3e4ae3-8b09-4fde-9e47-ff73e99f6fbb" />Is there a possibility that multiple parallel calls (9) have so much impact on performance ?