Re: Problem getting plpgsql to choose the right query plan

From: Niklas Johansson <spot(at)tele2(dot)se>
To: Helge Elvik <helge(dot)elvik(at)gispartner(dot)no>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem getting plpgsql to choose the right query plan
Date: 2006-03-13 15:03:41
Message-ID: 0A3909E6-6D27-40D7-9AF0-380D1A2BC20C@tele2.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 13 mar 2006, at 11.35, Helge Elvik wrote:
> Is there any way for me to force plpgsql not to use a cached query
> plan, but instead figure out what’s best based on the LIKE-string
> that actually get passed to the function?
You can build the query as a string and EXECUTE it. This will force a
new plan to be prepared.

http://www.postgresql.org/docs/8.1/interactive/plpgsql-
statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

Sincerely,

Niklas Johansson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-03-13 15:05:41 Re: Wal -long transaction
Previous Message Agnes Bocchino 2006-03-13 14:59:33 Wal -long transaction