Re: Postgres batch write very slow - what to do

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

 



Tom Lane wrote:
It sounds like you're incurring a network round trip for each row, which
will be expensive even for a co-located application.  Perhaps Oracle's
JDBC driver is smart enough to avoid that.  I'm not sure what tricks are
available for bulk loading with our JDBC driver --- the page Heikki
mentioned explains things from a server perspective but I dunno how that
translates into JDBC.  The folks who hang out on pgsql-jdbc could
probably give you some tips.

OP said he's using addBatch/executeBatch with a batch size of 100. The JDBC driver sends the whole batch before waiting for responses.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com


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

  Powered by Linux