Precompile SQL functions

Started by Bruce Momjianabout 23 years ago3 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Do we precompile SQL functions yet? I see it on the TODO list and I
can't remember if it is done.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: Precompile SQL functions

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Do we precompile SQL functions yet?

As of CVS tip, we can inline SQL functions that are simple "SELECT
expression" cases; and it's always been true that SQL function queries
are planned only once per outer query. I don't believe there's any
cross-query caching of SQL function plans, however.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: Precompile SQL functions

Just checking for TODO list. Thanks.

---------------------------------------------------------------------------

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Do we precompile SQL functions yet?

As of CVS tip, we can inline SQL functions that are simple "SELECT
expression" cases; and it's always been true that SQL function queries
are planned only once per outer query. I don't believe there's any
cross-query caching of SQL function plans, however.

regards, tom lane

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073