pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-performance@postgresql.org
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Subject: Re: anti-join chosen even when slower than old plan
Date: Tue, 09 Nov 2010 17:07:42 -0600
Message-ID: <4CD97FDE02000025000374D1@gw.wicourts.gov> (raw)
In-Reply-To: <4CD9663502000025000374B1@gw.wicourts.gov>
References: <4CD9663502000025000374B1@gw.wicourts.gov>

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> wrote:
 
> samples  %        symbol name
> 2320174  33.7617  index_getnext
 
I couldn't resist seeing where the time went within this function.
Over 13.7% of the opannotate run time was on this bit of code:

  /*
   * The xmin should match the previous xmax value, else chain is
   * broken.  (Note: this test is not optional because it protects
   * us against the case where the prior chain member's xmax aborted
   * since we looked at it.)
   */
  if (TransactionIdIsValid(scan->xs_prev_xmax) &&
      !TransactionIdEquals(scan->xs_prev_xmax,
                        HeapTupleHeaderGetXmin(heapTuple->t_data)))
      break;
 
I can't see why it would be such a hotspot, but it is.
 
-Kevin



view thread (62+ messages)  latest in thread

Message-ID: <4CD97FDE02000025000374D1@gw.wicourts.gov>
Permalink:  ../4CD97FDE02000025000374D1@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4CD97FDE02000025000374D1@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov
  Subject: Re: anti-join chosen even when slower than old plan
  In-Reply-To: <4CD97FDE02000025000374D1@gw.wicourts.gov>
  References: <4CD9663502000025000374B1@gw.wicourts.gov> <4CD97FDE02000025000374D1@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox