Dinesh Kumar: SQL vs PL/pgSQL in PostgreSQL: Plan Caching

SQL vs PL/pgSQL functions in PostgreSQL 16: why a SQL function is re-planned on every loop call, how to reduce plan time.

cloud

Sources