Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7BD652E0051 for ; Mon, 10 Mar 2008 12:20:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 09630-01 for ; Mon, 10 Mar 2008 12:20:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 3F2822E024E for ; Mon, 10 Mar 2008 12:20:42 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m2AFKfiA024305; Mon, 10 Mar 2008 11:20:41 -0400 (EDT) To: "Heikki Linnakangas" cc: "Craig Ringer" , pgsql-performance@postgresql.org Subject: Re: Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit In-reply-to: <47D54DB2.4020405@enterprisedb.com> References: <47D505AF.4040101@postnewspapers.com.au> <47D5150C.8090802@enterprisedb.com> <23588.1205159638@sss.pgh.pa.us> <47D54A47.3030608@postnewspapers.com.au> <47D54DB2.4020405@enterprisedb.com> Comments: In-reply-to "Heikki Linnakangas" message dated "Mon, 10 Mar 2008 15:03:14 -0000" Date: Mon, 10 Mar 2008 11:20:40 -0400 Message-ID: <24304.1205162440@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/203 X-Sequence-Number: 29157 "Heikki Linnakangas" writes: > The oprofile output is pretty damning: > samples % symbol name > 42148 99.7468 TransactionIdIsCurrentTransactionId Oh, I have no doubt that that could eat a lot of cycles inside the originating transaction ;-). I just misread Craig's complaint as being about the cost of the first table scan *after* that transaction. Getting rid of the linked-list representation would be a win in a couple of ways --- we'd not need the bogus "list of XIDs" support in pg_list.h, and xactGetCommittedChildren would go away. OTOH AtSubCommit_childXids would get more expensive. regards, tom lane