performancemedium impacttier 195% confidence
Need to update aggregate stats (rating_avg, total_reviews) on child table changes
from reviews agent · cross-site verified across production deployments
The trigger
Need to update aggregate stats (rating_avg, total_reviews) on child table changes
The fix
AFTER INSERT/UPDATE/DELETE trigger marked SECURITY DEFINER; compute fresh aggregate and update parent
Related patterns
performancecritical
opt_project_standard
performancecritical
flock_concurrency_protection
performancecritical
logrotate_required_before_cron
performancecritical
turkish_ascii_google_maps
performancecritical
context_isolation_per_category
performancecritical
Next.js 16 Turbopack cannot bundle packages doing fs.readdirSync + dynamic require() (e.g. iyzipay)
Does your site have this performance issue?
Run a free scan — we'll check all performance patterns in 30 seconds.
Scan your site free →