Re: performance for high-volume log insertion

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

 



On Sun, 26 Apr 2009, Kris Jurka wrote:

Scott Marlowe wrote:
On Sun, Apr 26, 2009 at 11:07 AM, Kris Jurka <books@xxxxxxxxxx> wrote:

As a note for non-JDBC users, the JDBC driver's batch interface allows
executing multiple statements in a single network roundtrip.  This is
something you can't get in libpq, so beware of this for comparison's sake..

Really?  I thought that executing statements like so:

select * from a;insert ...;delete;

in psql / libpq would execute them all in one trip.

Right, but those aren't prepared. I suppose it's possible to issue a prepare and then issue a batch of comma separated "execute" statements, but that's not exactly a natural interface.

for the task we are discussing here (log inserting) why wouldn't it be reasonable to have a prepared insert and then do begin;execute...;end to do a batch of them at once.

David Lang

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