pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Stone <mstone+postgres@mathom.us>
To: pgsql-performance@postgresql.org, Peter Eisentraut <peter_e@gmx.net>
Subject: Re: Index scan startup time
Date: Thu, 30 Mar 2006 08:29:17 -0500
Message-ID: <20060330132915.GL6811@mathom.us> (raw)
In-Reply-To: <20060330125147.GA13611@uio.no>
References: <200603301359.11038.peter_e@gmx.net>
	<20060330120206.GA13075@uio.no>
	<200603301423.54510.peter_e@gmx.net>
	<20060330123134.GA13408@uio.no>
	<20060330124251.GK6811@mathom.us>
	<20060330125147.GA13611@uio.no>

On Thu, Mar 30, 2006 at 02:51:47PM +0200, Steinar H. Gunderson wrote:
>On Thu, Mar 30, 2006 at 07:42:53AM -0500, Michael Stone wrote:
>> Yes. And the estimates are bad enough (orders of magnitude) that I can't 
>> help but wonder whether pg could come up with a better plan with better 
>> statistics:
>> 
>>>>>>  ->  Index Scan using activity_pk on activity  (cost=0.00..40717259.91 
>>>>>>  rows=6538650 width=8) (actual time=207356.050..207356.722 rows=100 
>>>>>>  loops=1) Filter: ((state = 10000) OR (state = 10001))
>
>Isn't the rows=100 here because of the LIMIT?

Yes. I was looking at the other side; I thought pg could estimate how 
much work it would have to do to hit the limit, but double-checking it 
looks like it can't.

Mike Stone



view thread (16+ messages)  latest in thread

Message-ID: <20060330132915.GL6811@mathom.us>
Permalink:  ../20060330132915.GL6811@mathom.us/
Also on:    postgresql.org/message-id/20060330132915.GL6811@mathom.us

 · 

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: mstone+postgres@mathom.us, peter_e@gmx.net
  Subject: Re: Index scan startup time
  In-Reply-To: <20060330132915.GL6811@mathom.us>

* 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