Row IDs in v5.x--was Hopeful No-brainer
Posted in 1996
Mickey Mestel wrote: > > The default is to return rows in rowid order in the absence of an > > order by clause in versions 5.x. The order is not affected by the > > presence or absence this means the order in which the rows were > > inserted, correct? > > mickm > > One question: > > let say that I delete a row and then insert another one, doesn't > informix use the "new" available space. If it does, then it won't > be in the order the rows were inserted, but be row id. Yes, Informix might use the available space. Then again, it might not. As I understand it, a user cannot predict where new rows will be written in such a scenario (in a new extent or in a vacant row.) If you want your data sorted, then you must request that order in the select clause. Even if you have "ALTERED INDEX TO CLUSTER", which physically orders the rows on the disk to match an index, that only holds as long as there is no add/delete to the table. Once you have changed the data you have no assurance of its order. Row ids are a function of the physical location of the row (see the OnLine Administrator's Guide for a complete description.) Of course, this all changes when a table is layed out with fragmentation (under versions >5.) Does that answer your question? ____________________________________________________________ | Clem Akins clema@informix.com | | International Support formerly | | Informix Software, Inc cwakins@leia.alloys.rmc.com| | Menlo Park, CA Standard Disclaimers Apply | |___________________________________________________________|