Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Anyway, if performance is your concern then you've got a couple of
options:
1) have each application cache several sequence values and use them
each time a new EO is inserted.
Pro: avoids the round trip on each insert - so it's faster
Con: sequence values are assigned in random order if multiple apps are
inserting new records.

2) have a trigger on the database side assign the next sequence value
on insert
Pro: avoids the round trip too so it's also faster
Con: the database is now out out sync with the EOF cache and so you
need to invalidate the newly created EO

3) switch to using globally unique ID's
Pro: nicely avoid both of the problems with options 1 and 2 above
Con: these are binary and this a little more pain to deal with when
manually writing SQL.

I hope that helps!
Mark
__
Mark Ritchie
Cocoa and WebObjects Developer
Diamond Lake Consulting Inc.
Toronto, Ontario, Canada

Continue reading on narkive:
Loading...