Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit - Mailing list pgsql-patches

From Pavan Deolasee
Subject Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
Date
Msg-id 2e78013d0803110606hb0eaa2aq1784608cf4c7026c@mail.gmail.com
Whole thread Raw
In response to Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-patches
On Tue, Mar 11, 2008 at 6:04 PM, Heikki Linnakangas
<heikki@enterprisedb.com> wrote:
> (moved to pgsql-patches, as there's a patch attached)
>
>
>  I couldn't let this case go, so I wrote a patch. I replaced the linked
>  list with an array that's enlarged at AtSubCommit_childXids when necessary.
>

We can replace the array of xids with an array of flags where i'th flag is
set to true if the corresponding subtransaction is committed. This would
make lookup O(1) operation. Of course, the downside is when the array
is sparse. Or we can switch to flag based representation once the array size
grows beyond a limit.

Thanks,
Pavan


--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: TransactionIdIsInProgress() cache
Next
From: "Pavan Deolasee"
Date:
Subject: Re: TransactionIdIsInProgress() cache