Re: Rowid range in Informix 7.x
Posted in 1998
In article <3516f6ff.734646109@news>, David Kosenko <dkosenko@monmouth.com> writes >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. > OOps! Misread, I thought they said serial fields not rowids. >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). > > How come ISQL forms use rowid? I checked in the 4GL 4.0 manuals and they RECOMMENDED using rowid!! Bit of an about turn huh? -- David Williams Maintainer of the Informix FAQ Primary site (Beta Version) http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html I see you standin', Standin' on your own, It's such a lonely place for you, For you to be If you need a shoulder, Or if you need a friend, I'll be here standing, Until the bitter end... So don't chastise me Or think I, I mean you harm... All I ever wanted Was for you To know that I care