On 3/30/06, Huy Do <[EMAIL PROTECTED]> wrote:
Michael Bayer wrote:
> Jonathan Ellis wrote:
>
>> I don't understand the objection -- #3 is the only one that works in the
>> general case without inefficiency as in #1 or attaching extra metadata to
>> user tables as in #2.  (SimpleORM uses #3 exclusively. :)
>>
>
> its a huge hit on the database to compare against all the columns youre
> updating, particularly if they are not indexed.  suppose you were updating
> 200 rows of 18 VARCHAR(4000) columns, for example.  or what if some of
> them are BLOBs, then youre totally out the window on that.  seems very
> inefficient at best, a buggy headache at worst.
>
>
I would assume this would only be done when there is a primary
key/unique key (i.e lookup by index) in the where statement i.e only for
single row updates.

Right.  So I guess this is a bit of a problem for SA, since it does allow PK-less mappings (last I remember).  You could always just say "hey, create a PK or performance is going to suck."  Or just do "the [technically] right thing" and require PKs. :)

--
Jonathan Ellis
http://spyced.blogspot.com

Reply via email to