Learn N1QL with Real Code Examples
Updated Nov 18, 2025
Performance Notes
Use GSI (Global Secondary Indexes) effectively
Avoid UNNEST without array indexes
Create covering indexes for expensive queries
Use LIMIT and OFFSET carefully
Security Notes
Enable role-based access control (RBAC)
Use TLS/SSL
Avoid exposing Query Service directly to clients
Validate input to prevent injection
Monitoring Analytics
Monitor via Couchbase UI
Track slow queries
Use EXPLAIN and PROFILE
Integrate with Prometheus/Grafana
Code Quality
Write readable SELECT queries
Avoid unnecessary nested arrays
Use parameterized queries
Apply proper indexing consistently