On Sat, Apr 10, 2010 at 4:47 PM, Ben Chobot wrote:
> My understanding is that this generally happens because the plan should be
> different for the different values, but the first time the function is run it
> caches the plan for one of the values and will never use the appropriate plan
> for t
I've got a sql language function which does a fairly simple select from a
table. If I give it one value, it performs quickly (half a ms). If I give it
another value, it does not (1.1 seconds). When I run the equivalent select
outside of the function, both values perform roughly the same (even th