Re: Index on immutable function call

From: Tore Halvorsen <tore(dot)halvorsen(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Index on immutable function call
Date: 2010-01-19 09:37:30
Message-ID: 50e97fa71001190137t319af2c5tec055076ec56fcce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 19, 2010 at 10:22 AM, Alban Hertroys
<dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> wrote:
>
> On 19 Jan 2010, at 8:26, A. Kretschmer wrote:
>> The planner doesn't know the actual parameter for the function, so he
>> picked out the wrong plan. You can force the planner to re-planning with
>> a dynamical statement within the function and EXECUTE that.
>
>
> There are no queries in his function, I think you misread his post.

Perhaps this might work?

create index transform_index on indexed_table(serial)
where data1 > this_is_a_long_transformation(data2);

--
Eld på åren og sol på eng gjer mannen fegen og fjåg. [Jøtul]
<demo> 2010 Tore Halvorsen || +052 0553034554

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2010-01-19 09:38:22 Re: Index on immutable function call
Previous Message Alban Hertroys 2010-01-19 09:22:30 Re: Index on immutable function call