Re: Is there hidden timestamp column ?
Posted in 1996
Topics: General Discussion
Nils Myklebust wrote: > > lclee@nntp.best.com (Lin-Chuan Lee) wrote: > > :Is there a timestamp column that can be queried/fetched > :like the rowid column ??? > > The lack of such a column is one of the major remaining problems with > Informix databases. Of course it should *NOT* be hidden, but be a > special datatype. I hope someone will do this for the Universal > Server. (For those who are not 100% clear on what a timestamp is it's > a type of serial that starts out at 1 (or 0) when a row is inserted > and is increased by 1 every time an update is done to that same row. > It's very usefull to avoid the need of locking rows in an optimistic > locking strategy.) I saw this a long time ago from a Visual Basic tip article(because it's difficult to do an optimistic locking on sql server form VB). Some people just add a datetime column to the table and update it to current everytime the record is updated. But you have to query and compare this timestamp to decide if another user has updated the row. This incurrs extra disk I/O, so it's not the best solution. Since Informix supports row level locking, and you can always add such a column youself. I don't see why this "is one of the major remaining problems with Informix databases". Please correct me if I am wrong. Weimin Yang Aerotek Inc.