Re: Insert vs Update

Поиск
Список
Период
Сортировка
От Michael Nolan
Тема Re: Insert vs Update
Дата
Msg-id CAOzAqu+UqrDXAqveH_PoK=6P2t28m3MSbem7ru0i5hoaACv5vw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Insert vs Update  (Robert DiFalco <robert.difalco@gmail.com>)
Ответы Re: Insert vs Update
Список pgsql-performance


On Wed, Jul 15, 2015 at 3:16 PM, Robert DiFalco <robert.difalco@gmail.com> wrote:

Thanks David, my example was a big simplification, but I appreciate your guidance. The different event types have differing amounts of related data. Query speed on this schema is not important, it's really the write speed that matters. So I was just wondering given the INSERT or UPDATE approach (with no indexed data being changed) if one is likely to be substantially faster than the other. 


As I understand how ACID compliance is done, updating a record will require updating any indexes for that record, even if the index keys are not changing.  That's because any pending transactions still need to be able to find the 'old' data, while new transactions need to be able to find the 'new' data.  And ACID also means an update is essentially a delete-and-insert. 
--
Mike Nolan

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

Предыдущее
От: Robert DiFalco
Дата:
Сообщение: Re: Insert vs Update
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Insert vs Update