Whenever you're ready, walk me through how you'd approach this.
You are asked to explain how you would optimize PostgreSQL database performance for a customer-facing application where slow queries affect user experience and support volume. Focus on how you would diagnose the bottleneck, choose the right fix, and balance read latency against write overhead and system stability.
Keep your answer practical and production-oriented. Cover query plans, indexing, query rewrites, schema or caching trade-offs, and when you would scale reads or investigate locks, statistics, or vacuum health.