minimal update

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема minimal update
Дата
Msg-id 472B4712.3060704@dunslane.net
обсуждение исходный текст
Ответы Re: minimal update  (David Fetter <david@fetter.org>)
Re: minimal update  (Decibel! <decibel@decibel.org>)
Список pgsql-hackers
For some time I have been working on removing some inefficiencies from a 
large DW-type app. This app does a large daily batch update, and this is 
what is the major bottleneck. One of the things I have been doing is to 
remove unnecessary updates (which are particualrly expensive in our 
index-rich setting).  Several times now I have wished that there was a 
switch on the UPDATE command that said "do minimal instead of maximal 
updating". i.e., don't update records with identical replacements. At 
the moment I have to write things like:
   update tname set foo = bar ... where foo is null or foo <> bar ...

This becomes more than tedious when the update might be setting thirty 
or forty fields, and I have to write such tests for each of them. It 
would be so much nicer to be able to write something like:
   update tname minimally set foo = bar ...

Is this an insane idea, or would it be possible, practical and useful?

cheers

andrew




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Intel x64 vs AMD x64 pgdata
Следующее
От: "Gokulakannan Somasundaram"
Дата:
Сообщение: Re: Clarification about HOT