Re: [PERFORM] not using index for select min(...)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PERFORM] not using index for select min(...)
Дата
Msg-id 4278.1044074132@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PERFORM] not using index for select min(...)  (Sean Chittenden <sean@chittenden.org>)
Ответы Re: [PERFORM] not using index for select min(...)  (Sean Chittenden <sean@chittenden.org>)
Re: [PERFORM] not using index for select min(...)  (Kevin Brown <kevin@sysexperts.com>)
Список pgsql-hackers
Sean Chittenden <sean@chittenden.org> writes:
> Now, there are some obvious problems:

You missed the real reason why this will never happen: it completely
kills any prospect of concurrent updates.  If transaction A has issued
an update on some row, and gone and modified the relevant aggregate
cache entries, what happens when transaction B wants to update another
row?  It has to wait for A to commit or not, so it knows whether to
believe A's changes to the aggregate cache entries.

For some aggregates you could imagine an 'undo' operator to allow
A's updates to be retroactively removed even after B has applied its
changes.  But that doesn't work very well in general.  And in any case,
you'd have to provide serialization interlocks on physical access to
each of the aggregate cache entries.  That bottleneck applied to every
update would be likely to negate any possible benefit from using the
cached values.
        regards, tom lane


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

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: [mail] Re: Windows Build System
Следующее
От: mlw
Дата:
Сообщение: Re: [mail] Re: Windows Build System