X-Original-To: pgsql-hackers-win32-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E9116D6E15; Wed, 7 Sep 2005 12:02:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52389-01; Wed, 7 Sep 2005 15:02:15 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id AB402D7D48; Wed, 7 Sep 2005 12:02:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j87F2D5h027313; Wed, 7 Sep 2005 11:02:13 -0400 (EDT) To: "Merlin Moncure" Cc: "Marc Cousin" , pgsql-performance@postgresql.org, pgsql-hackers-win32@postgresql.org Subject: Re: [PERFORM] insert performance for win32 In-reply-to: <6EE64EF3AB31D5448D0007DD34EEB3417DD290@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB3417DD290@Herge.rcsinc.local> Comments: In-reply-to "Merlin Moncure" message dated "Wed, 07 Sep 2005 09:08:18 -0400" Date: Wed, 07 Sep 2005 11:02:13 -0400 Message-ID: <27312.1126105333@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/2 X-Sequence-Number: 3368 "Merlin Moncure" 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