Re: plpgsql arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql arrays
Дата
Msg-id 28757.1238767715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на plpgsql arrays  (Matthew Wakeling <matthew@flymine.org>)
Ответы Re: plpgsql arrays  (Matthew Wakeling <matthew@flymine.org>)
Список pgsql-performance
Matthew Wakeling <matthew@flymine.org> writes:
> I have discovered that creating large arrays in plpgql is rather slow. In
> fact, it seems to be O(n^2).

For variable-width element types, yeah.  Don't go that way.

> ... alternatively is there a way to read two results streams
> simultaneously?

Use two cursors and FETCH from each as needed?  In recent releases you
can even scroll backwards, which you're going to need to do to make
a merge join work.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql arrays
Следующее
От: Matthew Wakeling
Дата:
Сообщение: Re: plpgsql arrays