[orm-devel] UPDATE optimization

Diedrich Vorberg diedrich@tux4web.de
20 Nov 2002 16:08:01 +0100


Hello,

last night at about one I was struk by an idea. This is what I did:
I modified datasource in a way that it will keep track of all 
updates. All updates to one dbobj will now be made in one statement 
as long no update to another dbobj is made in between or commit() is 
called. In other words:

   item1.a = 'b'
   item1.c = 'd'
   item2.e = 'f'
   item2.g = 'h'

will cause two update statements but

   item1.a = 'b'
   item2.e = 'f'
   item1.c = 'd'
   item2.g = 'h'

will cause four.

Comments anyone?

Diedrich
-- 
           _..._                            Diedrich Vorberg
         .'     '.
        /  _   _  \                         http://www.tux4web.de
        | (o)_(o) |                         info@tux4web.de
         \(     ) /            .---.
         //'._.'\ \           /     \       Internet Dienstleistungen
        //   .   \ \          \.@-@./       und 'Consulting'.
       ||   .     \ \         /`\_/`\
       |\   :     / |        //  _  \\      Linux Rules!
       \ `) '   (`  /_      | \     )|_
     _)``".____,.'"` (_    /`\_`>  <_/ \
     )     )'--'(     (    \__/'---'\__/
      '---`      `---`