Re: temporary table vs array performance

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: temporary table vs array performance
Дата
Msg-id CAKFQuwZWDqyKEtDZ4U4g1vnsvcGa=N4tzeXgK0rK3naJKy3j=w@mail.gmail.com
обсуждение исходный текст
Ответ на temporary table vs array performance  ("dbyzaa@163.com" <dbyzaa@163.com>)
Список pgsql-hackers
Its considered bad form to post to multiple lists.  Please pick the most relevant one - in this case I'd suggest -general.

On Mon, Sep 26, 2016 at 8:39 AM, dbyzaa@163.com <dbyzaa@163.com> wrote:

Array is not convenient to use in function, whether there are other methods can be replaced temp table in function


​I have no difficulty using arrays in functions.

As for "other methods" - you can use CTE (WITH) to create a truly local table - updating the catalogs by using a temp table is indeed quite expensive.

WITH vals AS  ( VALUES (1, 'lw'), (2, 'lw2') ) 
SELECT * FROM vals;

David J.

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

Предыдущее
От: "dbyzaa@163.com"
Дата:
Сообщение: temporary table vs array performance
Следующее
От: Enrique Meneses
Дата:
Сообщение: Re: Allowing GIN array_ops to work on anyarray