Re: Nested loops overpriced

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Nested loops overpriced
Date: 2007-05-09 11:58:25
Message-ID: 200705091358.25748.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Peter Eisentraut 2007-05-09 12:10:57 Apparently useless bitmap scans
Previous Message Gregory Stark 2007-05-09 11:36:19 Re: FW: