Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id EBA6D2E00FC for ; Tue, 11 Mar 2008 03:24:48 -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 14331-07 for ; Tue, 11 Mar 2008 03:24:41 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.249]) by postgresql.org (Postfix) with ESMTP id A65F92E0096 for ; Tue, 11 Mar 2008 03:24:43 -0300 (ADT) Received: by hs-out-0708.google.com with SMTP id x43so2089599hsb.3 for ; Mon, 10 Mar 2008 23:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=xSSZwLH2YqSyXMFTzL6srL/IP0lj1V/FZJO7TzfILy4=; b=JMyhPNP9IYTZ29m9Wogr3O6evm409RR1SUiEGk7VMY6pEv8oZQO+bWE6lt4O/HDRONNWw5bbyUpbABRjt59UM8+0QnYCJnZmzpijzUqk7F4wup6gILmO6fL9vZrhKi+McPliLono47jJ5Z/gvUCxrQJTXWxm/PlMKg7ySJ628dk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=goch8oHz+QMNzbb36MhBnDNiiyJxRckpWdAWrOqslpv+nGF6Swmqw3+G8vf/yZeKN+qcY8SHTeeKQYxiyIQFZuz+6dTu0zBxEvb3VLhJ0ymYQzCfBI60bGnGCpp39rBGKqbmA/lIcY72s6MvLxoNFl8yUe75CwFVogxt9PaIBhg= Received: by 10.150.136.6 with SMTP id j6mr3387669ybd.126.1205216682335; Mon, 10 Mar 2008 23:24:42 -0700 (PDT) Received: by 10.150.97.21 with HTTP; Mon, 10 Mar 2008 23:24:42 -0700 (PDT) Message-ID: <2e78013d0803102324i66fa5376rca1bc3d250bc8317@mail.gmail.com> Date: Tue, 11 Mar 2008 11:54:42 +0530 From: "Pavan Deolasee" To: "Heikki Linnakangas" Subject: Re: Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit Cc: "Craig Ringer" , pgsql-performance@postgresql.org In-Reply-To: <47D5150C.8090802@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47D505AF.4040101@postnewspapers.com.au> <47D5150C.8090802@enterprisedb.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/223 X-Sequence-Number: 29177 On Mon, Mar 10, 2008 at 4:31 PM, Heikki Linnakangas wrote: > According > to oprofile, all the time is spent in TransactionIdIsInProgress. I think > it would be pretty straightforward to store the committed subtransaction > ids in a sorted array, instead of a linked list, and binary search. Assuming that in most of the cases, there will be many committed and few aborted subtransactions, how about storing the list of *aborted* subtransactions ? Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com