OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Long Execution Time for Supabase Update Call in Next.js Application

  • Thread starter Thread starter mark02
  • Start date Start date
M

mark02

Guest
I'm working on a Next.js application that uses Supabase as the backend database. I'm encountering a performance issue where an update operation on the database takes significantly longer when executed through the Next.js app compared to running the equivalent SQL query directly in the database. Sample:

Code:
await client
  .from(TABLE)
  .update({ test: updatedTest })
  .match({ id })
  .throwOnError();

Next.js Version: ^14.2.3
Supabase: 1.50.4
Supabase/supabase-js: ^2.20.0

Why is there such a significant difference in execution time between the direct SQL query and the Supabase client call in the Next.js application?

Any ideas why the significant difference in execution time?

<p>I'm working on a Next.js application that uses Supabase as the backend database. I'm encountering a performance issue where an update operation on the database takes significantly longer when executed through the Next.js app compared to running the equivalent SQL query directly in the database. Sample:</p>
<pre><code>await client
.from(TABLE)
.update({ test: updatedTest })
.match({ id })
.throwOnError();

Next.js Version: ^14.2.3
Supabase: 1.50.4
Supabase/supabase-js: ^2.20.0
</code></pre>
<p>Why is there such a significant difference in execution time between the direct SQL query and the Supabase client call in the Next.js application?</p>
<p>Any ideas why the significant difference in execution time?</p>
 
Top