Re: plpgsql arrays

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

 



Matthew Wakeling <matthew@xxxxxxxxxxx> 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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux