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 2e78013d0803121026r227bbebdr5189be193b4a1bf5@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 Wed, Mar 12, 2008 at 10:44 PM, Heikki Linnakangas
<heikki@enterprisedb.com> wrote:

>
>  Imagine that you start a transaction just before transaction
>  wrap-around, so that the top level XID is 2^31-10. Then you start 20
>  subtransactions. What XIDs will they get? Now how would you map those to
>  a bitmap?
>

Wait. Subtransaction ids are local to a transaction and always start from 1.
See this:

    /*
     * reinitialize within-transaction counters
     */
    s->subTransactionId = TopSubTransactionId;
    currentSubTransactionId = TopSubTransactionId;


>
>  It's not that common to have hundreds of thousands of subtransactions to
>  begin with..

True. But thats the case we are trying to solve here :-)


Thanks,
Pavan

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

pgsql-patches by date:

Previous
From: "Pavan Deolasee"
Date:
Subject: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
Next
From: Tom Lane
Date:
Subject: Re: Proposed patch for LISTEN/NOTIFY race condition