About : rowid

Posted by Admin on 25-Jul-2008 02:42

Hi All,

I just want to know.

Does ROWID have any sequence when generated or it is generated randomaly ?

Regards

Vishwdeep

All Replies

Posted by Admin on 25-Jul-2008 03:39

You should consider it "randomly".

A ROWID describes the physical location of a record in the storage area the table is located. It's build using the block number and the record position in that block (so the number of records per block in the .st file make a difference). For a growing database therefor it might appear sequential.

As a developer, you should NEVER count on a ROWID value. There are some operations (like dump and load, proutil tablemove) that change the ROWID.

Never use it as a foreign field value in your metaschema. A GUID is a far better choice for that purpose.

The same applies to temp-table ROWIDs.

Posted by Tim Kuehn on 28-Jul-2008 06:48

Even within a user session, there are ways counting on ROWID can bite you, so be careful how it's used.

This thread is closed