pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Nested loops overpriced
Date: Wed, 9 May 2007 13:58:25 +0200
Message-ID: <200705091358.25748.peter_e@gmx.net> (raw)
In-Reply-To: <1987.1178639593@sss.pgh.pa.us>
References: <200705081722.16731.peter_e@gmx.net>
	<1987.1178639593@sss.pgh.pa.us>

Am Dienstag, 8. Mai 2007 17:53 schrieb Tom Lane:
> Hmm, I'd have expected it to discount the repeated indexscans a lot more
> than it seems to be doing for you.  As an example in the regression
> database, note what happens to the inner indexscan cost estimate when
> the number of outer tuples grows:

I can reproduce your results in the regression test database. 8.2.1 and 8.2.4 
behave the same.

I checked the code around cost_index(), and the assumptions appear to be 
correct (at least this query doesn't produce wildly unusual data).  
Apparently, however, the caching effects are much more significant than the 
model takes into account.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



view thread (12+ messages)  latest in thread

Message-ID: <200705091358.25748.peter_e@gmx.net>
Permalink:  ../200705091358.25748.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200705091358.25748.peter_e@gmx.net

 · 

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: peter_e@gmx.net, tgl@sss.pgh.pa.us
  Subject: Re: Nested loops overpriced
  In-Reply-To: <200705091358.25748.peter_e@gmx.net>

* 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