Subject Re: [IBO] serious design problem: update queries
Author Svein Erling Tysvaer
At 10:39 21.07.2003 +0200, you wrote:
>UPDATE orders SET lastname = :lastname WHERE orderID = ID
>
>in stead of
>UPDATE orders SET lastname =:lastname,
>firstname=:firstname,orderID=:id,achived=:archived WHERE orderID = ID

The "problem" with this would be that updating only changed fields would
require a reprepare every time (basically eliminating the prime reason for
using parameters at all), whereas updating all fields that could
potentially change would only need to prepare once. I don't know how much
overhead a prepare demands (well, I do know it is a bit time consuming, but
not how much communication that happens between the server and the client),
and maybe there are situations where this approach would be useful (e.g.
where your query include blobs or big varchars).

Set