Re: [PERFORM] Problem: query becomes slow when calling a fast user defined function.

2006-06-05 Thread Tom Lane
Dan Libby <[EMAIL PROTECTED]> writes: > Or failing that, I'd at least like to understand why the planner > is deciding not to use the category_lang index when the result > set is coming from a function instead of a "regular" table. The planner defaults to assuming that set-returning functions re

[PERFORM] Problem: query becomes slow when calling a fast user defined function.

2006-06-05 Thread Dan Libby
Hi, Using postgres 8.0.1, I'm having a problem where a user-defined function that executes quite quickly on its own slows down the calling query, which ignores at least one index. I don't think this should be happening. Please forgive the long explanation below; I'm trying to be clear. So --