[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)
[Discussions](/c/community/4)
# Performance Issues with Database Queries on Cloud Server
82 views · 2 likes · 3 posts
Freeflyaz (@freeflyaz) · 2025-03-15 · ♥ 1
## Performance Comparison: Local vs Cloud
| | Metric | | Local (Mac) | | Cloud Server | |
|---|
| |------------------|------------|--------------| |
| | **Prisma Query Avg** | | 14.93ms | | 114.48ms | |
| | **Prisma Query Fastest** | | 13.03ms | | 88.30ms | |
| | **Raw SQL Query Avg** | | 10.87ms | | 108.79ms | |
| | **Raw SQL Query Fastest** | | 10.28ms | | 81.29ms | |
| | **Prisma Connection Time** | | 0.48ms | | 5.67ms | |
| | **Raw SQL Connection Time** | | 0.31ms | | 2.38ms | |
### Key Observations:
- Queries on the cloud server are **7x-12x slower** than on my local machine.
- Both Prisma and raw SQL perform significantly worse on the cloud.
- Connection times are also much higher in the cloud.
1. Is this expected based on my current plan?
2. Is there a resource bottleneck? (CPU, RAM, network latency, database IOPS?)
3. Would upgrading to a higher-tier plan help?
BestCodes (@bestcodes) · 2025-03-15
This is interesting. Do you have Fluid Compute enabled?
Freeflyaz (@freeflyaz) · 2025-03-16 · ♥ 1
## Performance Comparison: Local vs Cloud vs Cloud with Fluid Compute
| | Metric | | Local (Mac) | | Cloud Server (Standard) | | Cloud with Fluid Compute | |
|---|
| |------------------------------|-------------|-------------------------|--------------------------| |
| | **Prisma Query Avg** | | 14.93ms | | 114.48ms | | 95.54ms | |
| | **Prisma Query Fastest** | | 13.03ms | | 88.30ms | | 92.21ms | |
| | **Raw SQL Query Avg** | | 10.87ms | | 108.79ms | | 79.23ms | |
| | **Raw SQL Query Fastest** | | 10.28ms | | 81.29ms | | 69.05ms | |
| | **Prisma Connection Time** | | 0.48ms | | 5.67ms | | 2.96ms | |
| | **Raw SQL Connection Time** | | 0.31ms | | 2.38ms | | 2.17ms | |
Hey, thanks for the suggestion to try Fluid Compute. After enabling it, I ran another round of benchmarks, and here’s what I found:
* **Prisma Queries:** The average time on the cloud improved from **114.48ms** to **95.54ms**.
* **Raw SQL Queries:** The average improved from **108.79ms** down to **79.23ms**.
* **Connection Times:** Prisma’s connection time decreased from **5.67ms** to **2.96ms**.
While my local machine still outperforms the cloud, these improvements with Fluid Compute are promising. Does anyone have additional suggestions or further tweaks ?
Thanks again for the tip!