Re: Array interface

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

 



On 10/11/10 22:10, Mark Kirkwood wrote:

What might also be interesting is doing each INSERT with an array-load of bind variables appended to the VALUES clause - as this will only do 1 insert call per "array" of values.

This is probably more like what you were expecting:

rows    num values tuples(i.e array size) elapsed
1000000                 1                     106
1000000                10                      14
1000000               100                      13
1000000              1000                      14

I didn't try to use PREPARE + EXECUTE here, just did "do" with the INSERT + array size number of VALUES tuples (execute could well be faster). The obvious difference here is we only do rows/(array size) number of insert calls.

Cheers

Mark

Attachment: execinsert-values.pl
Description: Perl program

-- 
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