pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: Marc Cousin <mcousin@sigma.fr>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers-win32@postgresql.org
Subject: Re: [PERFORM] insert performance for win32
Date: Wed, 07 Sep 2005 11:02:13 -0400
Message-ID: <27312.1126105333@sss.pgh.pa.us> (raw)
In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB3417DD290@Herge.rcsinc.local>
References: <6EE64EF3AB31D5448D0007DD34EEB3417DD290@Herge.rcsinc.local>

"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> ok, I've been in crunching profile profile graphs, and so far have been
> only been able to draw following conclusions.

> For bulk, 'in-transaction' insert:
> 1. win32 is slower than linux.  win32 time for each insert grows with #
> inserts in xact, linux does not (or grows much slower).  Win32 starts
> out about 3x slower and grows to 10x slower after 250k inserts.

Just to be clear: what you were testing was
	BEGIN;
	INSERT ... VALUES (...);
	repeat insert many times
	COMMIT;
with each statement issued as a separate PQexec() operation, correct?
Was this set up as a psql script, or specialized C code?  (If a psql
script, I wonder whether it's psql that's chewing the time.)

> 2. ran a 50k profile vs. 250k profile.  Nothing jumps out as being
> slower or faster: most time is spent in yyparse on either side.  From
> this my preliminary conclusion is that there is something going on in
> the win32 api which is not showing in the profile.

Hmm.  Client/server data transport maybe?  It would be interesting to
try inserting the same data in other ways:
	* COPY from client
	* COPY from disk file
	* INSERT/SELECT from another table
and see whether you see a similar slowdown.

			regards, tom lane



view thread (53+ messages)  latest in thread

Message-ID: <27312.1126105333@sss.pgh.pa.us>
Permalink:  ../27312.1126105333@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27312.1126105333@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, merlin.moncure@rcsonline.com, mcousin@sigma.fr, pgsql-hackers-win32@postgresql.org
  Subject: Re: [PERFORM] insert performance for win32
  In-Reply-To: <27312.1126105333@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox