From: Tom Lane <tgl@sss.pgh.pa.us>
To: jim@nasby.net
Cc: pgsql-performance@postgresql.org
Subject: Re: Hash or merge join instead of inner loop
Date: Tue, 10 Jun 2003 16:56:45 -0400
Message-ID: <4799.1055278605@sss.pgh.pa.us> (raw)
In-Reply-To: <20030610194206.GK40542@flake.decibel.org>
References: <20030609204009.GJ40542@flake.decibel.org>
<274.1055225711@sss.pgh.pa.us>
<20030610194206.GK40542@flake.decibel.org>
"Jim C. Nasby" <jim@nasby.net> writes:
> On Tue, Jun 10, 2003 at 02:15:11AM -0400, Tom Lane wrote:
>> ... In reality, most of the upper btree levels will no doubt
>> stay in memory during such a query, and so this estimate charges many
>> more reads than really occur. Fixing this is on the todo list, but no
>> one's got to it yet. (It's not clear to me how to put the consideration
>> into the planner's cost algorithms in a clean way.)
> What about just ignoring all but the leaf pages?
IIRC, we already know what cost model we want to use. The problem is
that the planner's code structure makes it difficult for the indexscan
coster to know that the indexscan will be applied repeatedly rather than
just once. That's what has to be solved.
regards, tom lane
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: tgl@sss.pgh.pa.us, jim@nasby.net
Subject: Re: Hash or merge join instead of inner loop
In-Reply-To: <4799.1055278605@sss.pgh.pa.us>
References: <20030609204009.GJ40542@flake.decibel.org> <274.1055225711@sss.pgh.pa.us> <20030610194206.GK40542@flake.decibel.org> <4799.1055278605@sss.pgh.pa.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