Subject | Re: [IBO] serious design problem: update queries |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-07-21T10:26:39Z |
At 10:39 21.07.2003 +0200, you wrote:
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
>UPDATE orders SET lastname = :lastname WHERE orderID = IDThe "problem" with this would be that updating only changed fields would
>
>in stead of
>UPDATE orders SET lastname =:lastname,
>firstname=:firstname,orderID=:id,achived=:archived WHERE orderID = ID
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