Re: [PERFORM] Big IN() clauses etc : feature proposal

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [PERFORM] Big IN() clauses etc : feature proposal
Дата
Msg-id 20060510145551.GB14476@svana.org
обсуждение исходный текст
Ответ на Re: [PERFORM] Big IN() clauses etc : feature proposal  (PFC <lists@peufeu.com>)
Ответы Re: [PERFORM] Big IN() clauses etc : feature proposal  (Nis Jorgensen <nis@superlativ.dk>)
Список pgsql-hackers
On Wed, May 10, 2006 at 04:38:31PM +0200, PFC wrote:
>     You need to do some processing to know how many rows the function
>     would  return.
>     Often, this processing will be repeated in the function itself.
>     Sometimes it's very simple (ie. the function will RETURN NEXT each
> element in an array, you know the array length...)
>     Sometimes, for functions returning few rows, it might be faster to
> compute the entire result set in the cost estimator.

I think the best would probably be to assign a constant. An SRF will
generally return between one of 1-10, 10-100, 100-1000, etc. You don't
need exact number, you just need to get within an order of magnitude
and a constant will work fine for that.

How many functions sometimes return one and sometimes a million rows?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: PFC
Дата:
Сообщение: Re: [PERFORM] Big IN() clauses etc : feature proposal
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: [PERFORM] Big IN() clauses etc : feature proposal