pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: Index scan startup time
Date: Thu, 30 Mar 2006 15:00:41 +0200
Message-ID: <20060330130041.GA13732@uio.no> (raw)
In-Reply-To: <200603301459.03011.peter_e@gmx.net>
References: <200603301359.11038.peter_e@gmx.net>
	<200603301423.54510.peter_e@gmx.net>
	<20060330123134.GA13408@uio.no>
	<200603301459.03011.peter_e@gmx.net>

On Thu, Mar 30, 2006 at 02:59:02PM +0200, Peter Eisentraut wrote:
>> Well, it's logical enough; it scans along activity_id until it finds one
>> with state=10000 or state=10001. You obviously have a _lot_ of records with
>> low activity_id and state none of these two, so Postgres needs to scan all
>> those records before it founds 100 it can output. This is the “startup
>> cost” you're seeing.
> The startup cost is the cost until the plan is set up to start outputting 
> rows.  It is not the time until the first row is found.

Well, point, my terminology was wrong. Still, what you're seeing is endless
scanning for the first row. I don't know your distribution, but are you
really sure state wouldn't have better selectivity?

/* Steinar */
-- 
Homepage: http://www.sesse.net/



view thread (16+ messages)  latest in thread

Message-ID: <20060330130041.GA13732@uio.no>
Permalink:  ../20060330130041.GA13732@uio.no/
Also on:    postgresql.org/message-id/20060330130041.GA13732@uio.no

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sgunderson@bigfoot.com
  Subject: Re: Index scan startup time
  In-Reply-To: <20060330130041.GA13732@uio.no>

* 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