Re: pl/pgsql functions outperforming sql ones? - Mailing list pgsql-performance

From Pavel Stehule
Subject Re: pl/pgsql functions outperforming sql ones?
Date
Msg-id CAFj8pRBC2G38LctvcSnvAjsAZD8=r_xm6KSYeFog-td6927U4Q@mail.gmail.com
Whole thread Raw
In response to Re: pl/pgsql functions outperforming sql ones?  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
List pgsql-performance
2012/1/31 Carlo Stonebanks <stonec.register@sympatico.ca>:
> Pavel, thank you very much for your explanation.
>
> Is it possible to define under what conditions that sql procs will
> outperform plpgsql ones, and vice-versa?

yes, little bit :)

when inlining is possible, then SQL function will be faster - typical
use case is simple scalar functions (with nonvolatile real
parameters).

Regards

Pavel

>
> -----Original Message-----

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Why should such a simple query over indexed columns be so slow?
Next
From: CSS
Date:
Subject: rough benchmarks, sata vs. ssd