Technical question on PREPARE statements and PLPGSQL cached plans - Mailing list pgsql-general

From Chris Travers
Subject Technical question on PREPARE statements and PLPGSQL cached plans
Date
Msg-id CAKt_ZfvaGwG=M3jujtkshUfP0oK9QMkyfxpDZunzLQqtREau5Q@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi;

I was wondering....  When is a PREPARE statement planned?  On first
execution?  At the time the PREPARE statement is called?

How does the planner decide what sorts of plans to use when the ideal
plan might change based on future runs?

Is this the same wrt PLPGSQL cached plans?  Or are they planned differently?

Best Wishes,
Chris Travers

pgsql-general by date:

Previous
From: Durumdara
Date:
Subject: Re: When the Session ends in PGSQL?
Next
From: Vincent de Phily
Date:
Subject: Re: How to create "auto-increment" field WITHOUT a sequence object?