Search Postgresql Archives

Re: [PERFORM] [HACKERS] temporary table vs array performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx <dbyzaa@xxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux