Re: Index on two columns not used

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Index on two columns not used
Дата
Msg-id 453DDD00.3000503@logix-tt.com
обсуждение исходный текст
Ответ на Re: Index on two columns not used  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hi, Tom,

Tom Lane wrote:

> You're wrong.  An UPDATE always writes a new version of the row (if it
> overwrote the row in-place, it wouldn't be rollback-able).  The new
> version has a different TID and therefore the index entry must change.
> To support MVCC, our approach is to always insert a new index entry
> pointing at the new TID --- the old one remains in place so that the old
> version can still be found by transactions that need it.

OK, good you corrected me.

I had the weird impression that both row versions have the same tuple ID
(as they are different versions of the same tuple), and so an index
change is not necessary when both versions fit on the same page.

Thanks,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

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

Предыдущее
От: Stuart Bishop
Дата:
Сообщение: Re: Slow functional indexes?
Следующее
От: Jignesh Shah
Дата:
Сообщение: Re: Copy database performance issue