Re: Storing hot members of PGPROC out of the band - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Storing hot members of PGPROC out of the band
Date
Msg-id CA+TgmoaSnmJnyuih1e1jD=0mkW0t2GV6j4J-9cAjcgaPPW8kCA@mail.gmail.com
Whole thread Raw
In response to Re: Storing hot members of PGPROC out of the band  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Storing hot members of PGPROC out of the band  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Nov 7, 2011 at 6:45 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> While looking at GetSnapshotData(), it occurred to me that when a PGPROC
> entry does not have its xid set, ie. xid == InvalidTransactionId, it's
> pointless to check the subxid array for that proc. If a transaction has no
> xid, none of its subtransactions can have an xid either. That's a trivial
> optimization, see attached. I tested this with "pgbench -S -M prepared -c
> 500" on the 8-core box, and it seemed to make a 1-2% difference (without the
> other patch). So, almost in the noise, but it also doesn't cost us anything
> in terms of readability or otherwise.

Oh, that's a good idea.  +1 for doing that now, and then we can keep
working on the rest of it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: git trunk doesn't build
Next
From: Robert Haas
Date:
Subject: Re: -Wcast-qual cleanup, part 1