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