Tag

Generic Plan

1 views collected around this technical thread.

Laravel Tech Community
Laravel Tech Community
Jun 9, 2021 · Databases

Understanding PostgreSQL Prepared Statements and Plan Caching (Generic vs Custom)

This article explains how PostgreSQL's prepared statements cache execution plans, describing the default behavior of generating custom plans for the first five executions before switching to a generic plan, and shows how PostgreSQL 14 adds generic_plans and custom_plans columns to the pg_prepared_statements view for monitoring.

Custom PlanDatabase performanceGeneric Plan
0 likes · 2 min read
Understanding PostgreSQL Prepared Statements and Plan Caching (Generic vs Custom)