Re: SQL Function Slowness, 8.3.0

From: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
To: "Gavin M(dot) Roy" <gmr(at)myyearbook(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: SQL Function Slowness, 8.3.0
Date: 2008-04-16 15:14:26
Message-ID: 480617D2.7070407@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Are you going to post the function? :-)

My PL/PGSQL functions are running fine in 8.3.x.

Cheers,
mark

Gavin M. Roy wrote:
> In 8.3.0, I'm seeing some oddities with SQL functions which I thought
> were immune to the planner data restrictions of plpgsql functions and
> the sort. Basically I have a query which executes in 5ms but when
> wrapped in a SQL function, takes 500ms. I've checked all the types
> passed in to make sure they match so there is no type conversions
> taking place in execution.
>
> I'm curious about the validity of my expectation that functions
> created with SQL as the language should be as fast as the straight SQL
> counterpart. I've previously not run into such an order of magnitude
> difference in using SQL functions. Is this a change of behavior in
> 8.3 from 8.2? Without specific examples, are there any
> recommendations on how to speed up these functions?
>
> Thanks,
>
> Gavin
>

--
Mark Mielke <mark(at)mielke(dot)cc>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Marinos Yannikos 2008-04-16 15:22:50 Background writer underemphasized ...
Previous Message Tom Lane 2008-04-16 15:09:47 Re: SQL Function Slowness, 8.3.0