Re: planner/optimizer question

Поиск
Список
Период
Сортировка
От Gary Doades
Тема Re: planner/optimizer question
Дата
Msg-id 408F5ECD.29849.CA91084@localhost
обсуждение исходный текст
Ответ на Re: planner/optimizer question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: planner/optimizer question  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: planner/optimizer question  (Manfred Koizar <mkoi-pg@aon.at>)
Список pgsql-performance
I know you will shoot me down, but...

Why is there an entry in the index for a row if the row is not valid?
Wouldn't it be better for the index entry validity to track the row validity.
If a particular data value for a query (join, where etc.) can be satisfied
by the index entry itself this would be a big performance gain.

Cheers,
Gary.

On 28 Apr 2004 at 0:27, Tom Lane wrote:

> brad-pgperf@duttonbros.com writes:
> > ... Wouldn't the most efficient plan be to scan the index regardless
> > of crm_id because the only columns needed are in the index?
>
> No.  People coming from other databases often have the misconception
> that queries can be answered by looking only at an index.  That is never
> true in Postgres because row validity info is only stored in the table;
> so we must always visit the table entry to make sure the row is still
> valid/visible for the current query.
>
> Accordingly, columns added to the index that aren't constrained by the
> WHERE clause are not very useful ...
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: planner/optimizer question
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: planner/optimizer question