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. It might not work when if you want to check for changes to child records which may also mean a concurrency error even though the main record has not changed.

so then we would say, well ok make this behavior as just an option.

but then, the behavior is optional.  so, better to use the version id
option, which is very simple and easy to make efficient...the developer
just adds a proper index to the version ID column.  works with BLOBs etc
no problem.

I've never had a good feeling about products adding columns/tables to my database, so it's great that all this is optional.
however, option #3 may be implementable within MapperExtension, and if
not, I am fine with looking into insuring that it has adequate hooks, for
people who want stuff like #3 or whatever.  I would like there to be a
catalog of MapperExtension that provide all the patterns people want to
use (like the polymorhic thing as well).

basically, the philosophy addendum coming out of this and other issues
that have already been raised is a "small and light core, a plugin system
for all the heavy questionable stuff".  I dont want anything chunky built
in by default.
Amen.

Huy


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to