#

Database Optimization

8 articles tagged #Database Optimization

Advertisement

Django ORM N+1 Queries in Serializers: Detecting and Fixing Them

N+1 query bugs in Django serializers can silently turn a fast endpoint into a database-hammering bottleneck. Learn how to detect them with django-debug-toolbar and nplusone, then fix them permanently with select_related and prefetch_related.

Jun 28, 2026 8m read πŸ‘ 24

Fixing PostgreSQL UPSERT That Silently Skips Updates on Conflict

Your INSERT ... ON CONFLICT DO UPDATE looks right, but rows are never actually updated. This guide digs into the common causes β€” wrong conflict targets, excluded column mistakes, and WHERE clause gotchas β€” and shows you how to fix each one.

Jun 23, 2026 10m read πŸ‘ 35
πŸ“¬ Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.