-
Notifications
You must be signed in to change notification settings - Fork 325
Description
Is your feature request related to a problem?
PostgreSQL compute costs can be high due to expensive database queries. The current implementation uses SELECT *
for all queries, resulting in 60-70% higher CPU usage than necessary. This leads to significant hosting cost increases, especially for photo-heavy applications.
Describe the feature/solution you'd like
Database query optimizations that reduce PostgreSQL CPU usage by implementing:
- Context-specific column selection (grid/admin/detail views only fetch needed
columns) - Connection pooling optimization
I've implemented these optimizations and achieved a 67% reduction in compute usage ($20/month savings) with no functionality regressions after 3+ months in production.

Neon database billing before optimizations


Neon database billing after optimizations


Live deployment
https://pics.yomieluwan.de
Would you be interested in a PR with these optimizations?