Significant Performance Gap: Prisma vs Supabase Client in Nuxt 3
Issue Description
I've built a performance comparison tool to test the response times between Prisma and Supabase client when querying the same Supabase database. The results show that Prisma queries are significantly slower (approximately 7-8x) than direct Supabase client queries.
Environment
- Nuxt 3
- Prisma
- @nuxtjs/supabase
- Database: PostgreSQL - Supabase
- Connection: Using Supabase connection pooling (Supavisor)
Code Snippet
- Prisma
- SupabaseClient
Questions
- Why is there such a significant performance difference between Prisma and Supabase client?
- Are there any recommended configurations or optimizations for Prisma when used with Supabase?
- Could this be related to connection pooling or the way Prisma establishes database connections?
- Are there any best practices for improving Prisma's performance in this scenario?
Additional Context
- No significant load on the database
- Both implementations use the same database connection string with connection pooling
- The performance difference is consistent across multiple tests
