Advanced SQL Best Practices
Advanced SQL pays off when readable and measured.
Search across all documentation pages
Advanced SQL pays off when readable and measured.
Let ORM do CRUD; raw SQL files for reporting and complex pipelines.
Stack versions: This page was written for PostgreSQL 18.4 (stable 18, maintenance 17), pgvector 0.8+, PgBouncer 1.x, Patroni 3.x, and PostGIS 3.5+.
Reviewed by Chris St. John·Last updated Jul 18, 2026