On fim, 2007-04-05 at 16:31 -0400, jungmin shin wrote: > > I'm executing a query invoking a UDF. > It looks that Postgres use a cache for executing UDFs. Postgresql is not using a cache specially for executing UDFs, apart from only compiling the function once for each session. > > select a() > Excution time of above statement is different each time. > What is happening inside of the Postgres when I invoke a UDF in a > query? > > It is taking 200ms or 11688ms . Postgresql relies on the filesystem and operating system to cache fisk buffers efficiently, so you are probably just seeing the effects of that, assuming that your function is doing the same thing each time. > > If a cache is used for this execution , can I turn off the cache > option? why would you want to do that? gnari