Re: Hash or merge join instead of inner loop

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: Hash or merge join instead of inner loop
Дата
Msg-id 3EE5EA89.19260.8C8B669@localhost
обсуждение исходный текст
Ответ на Re: Hash or merge join instead of inner loop  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On 10 Jun 2003 at 2:15, Tom Lane wrote:

> There's been some discussion about that before; you could check the
> archives (now that they're up again ;-)).  I believe that the planner
> overestimates the cost of a nestloop with inner indexscan, because it
> costs the indexscans as though each one is an independent ab-initio
> index search.  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.)

Just being naïve here, but if planner and executor account for shared
buffers+effective OS cache, even a boolean choice could be a start.

Say a query needs 100MB of data according to estimates so if shared
buffers+effective OS cache covers that, we can lower the cost.

May be we should have two config. parameters for tuple cost? Disk read tuple
cost and memory read tuple cost. Later being 1/10th of former?

Bye
 Shridhar

--
All new:    Parts not interchangeable with previous model.


В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hash or merge join instead of inner loop
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: FW: [ADMIN] Shared_buffers and kernel parameters, tuning