Re: generate_series woes

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: generate_series woes
Дата
Msg-id 20080416122016.GA28221@depesz.com
обсуждение исходный текст
Ответ на generate_series woes  (Harald Fuchs <hari.fuchs@googlemail.com>)
Ответы Re: generate_series woes
Список pgsql-general
On Mon, Apr 14, 2008 at 11:21:58AM +0200, Harald Fuchs wrote:
> I think there's something sub-optimal with generate_series.
> In the following, "documents" is a table with more than 120000 rows,
> vacuumed and analyzed before the queries.
> Since generate_series is a builtin function, can't it tell how many
> rows it will return?

i think it would be better off not to limit some functionality for
builtin functions. it would be much nicer to have the ability to hint
planer about rowcount from function *in* the sql.

something like:

select i from generate_series(1,10) {hint:10} as i;

i'm not proposiung syntax. i'm suggesting the functionality.

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

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

Предыдущее
От: Harald Fuchs
Дата:
Сообщение: Re: generate_series woes
Следующее
От: Volkan YAZICI
Дата:
Сообщение: Re: generate_series woes