I haven't checked more recent versions,
but in 8.2 using
case when new.val is null then 'U' else new.val end
worked a hell of a lot faster then coalesce.
However, just going into the trigger is significant overhead.
Alban's suggestion of using a
On 12 September 2012 08:49, Willy-Bas Loos wrote:
> Hi,
>
> I want to force deafults, and wonder about the performance.
> The trigger i use (below) makes the query (also below) take 45% more time.
> The result is the same now, but i do have a use for using the trigger (see
> "background info").
>