Technical question on PREPARE statements and PLPGSQL cached plans

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Technical question on PREPARE statements and PLPGSQL cached plans
Date: 2011-07-04 09:07:15
Message-ID: CAKt_ZfvaGwG=M3jujtkshUfP0oK9QMkyfxpDZunzLQqtREau5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Vincent de Phily 2011-07-04 09:28:17 Re: When the Session ends in PGSQL?
Previous Message Vincent de Phily 2011-07-04 09:05:46 Re: How to create "auto-increment" field WITHOUT a sequence object?