Re: [PERFORM] insert performance for win32

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: "Marc Cousin" <mcousin(at)sigma(dot)fr>, pgsql-performance(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: [PERFORM] insert performance for win32
Date: 2005-09-07 15:02:13
Message-ID: 27312.1126105333@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-performance

"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)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

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Merlin Moncure 2005-09-07 19:01:14 Re: [PERFORM] insert performance for win32
Previous Message Merlin Moncure 2005-09-07 13:08:18 Re: [PERFORM] insert performance for win32

Browse pgsql-performance by date

  From Date Subject
Next Message Christian Compagnon 2005-09-07 16:22:27 Query take 101 minutes, help, please
Previous Message Merlin Moncure 2005-09-07 13:08:18 Re: [PERFORM] insert performance for win32