Re: Rowid range in Informix 7.x
Posted in 1998
Topics: Installation, Setup & Upgrades
David Williams <djw@smooth1.demon.co.uk> offerred: :>>Also, if the row numbers is very large, do they wrap around, so that :>>a min(rowid) may be less than a max(rowid) for a table? :>Impossible, it would cause error when rows exceeding the limit. :> : It DOES wrap, however if an existing row has the new value then it : fails i.e. it will not skip over existing values. Say what? REAL rowids NEVER "wrap" as they are location values. I.e. two rows cannot exist in the same location. If you are using pseudo rowids (you created the table WITH ROWIDS) then you are correct, as these are nothing more than SERIAL values and behave accordingly. Do note that if you are trying to use real rowids, and your table is fragmented, the rowids will NOT be guaranteed unique, and you CAN have multiple rows with the same rowid (albeit in different fragments). Also note that it is a generally BAD idea to use rowids when accessing rows; use a primary key value instead. It is more portable, upgradeable, and supportable (though not quite as fast).