| От | Adrian von Bidder |
|---|---|
| Тема | Re: Updates: all or partial records |
| Дата | |
| Msg-id | 201001251030.04071@fortytwo.ch обсуждение исходный текст |
| Ответ на | Re: Updates: all or partial records (John R Pierce <pierce@hogranch.com>) |
| Ответы |
Re: Updates: all or partial records
|
| Список | pgsql-general |
On Monday 25 January 2010 08.25:30 John R Pierce wrote: > > My question is, which is more efficient? Performance-wise, does it > > matter whether unchanged fields are included or omitted on UPDATE > > statements > > my first order guess is, sending and having to parse the additional > unchanged fields in your UPDATE statement is more expensive than letting > the engine just copy them from the old tuple to the new. Especially since setting unchanged fields might also trigger all sorts of unneeded DB activity (check constraints, and doesn't pg now also allow firing trigger based on which fields were updated?) which will (presumably, don't know the code and haven't tested it) will probably not be triggered if postgres can know that the value is not to be changed. cheers -- vbi -- Protect your privacy - encrypt your email: http://fortytwo.ch/gpg/intro
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера