Re: ROWID Question - ADDITION/CORRECTION
Posted in 1996
Topics: Clustering, Grid & MACH11
Tim Porreca wrote: > > Ron Delpiere-Smith wrote: > > > > The ROWID will be assigned sequentially as long as you do not delete any > > rows from the table. This also includes not rolling back any transactions > > that effect this table. A ROLLBACK will have the same effect as a delete > > is a row has been inserted after the a row that has not been committed, and > > eventually rolled back. > > > > Your are better off with the date time stamp. Chances are you are already > > storing the date somewhere. > > > > Ron Delpiere-Smith <RonDelpiere@earthlink.net> wrote in article > > <01bbcc6c$b56eeaa0$2f642399@smithp90>... > > > Tim: > > > > > > The ROWID is a combination of the data page number and the slot number > > > within the page. By adding the rows and never deleting them will > > preserve > > > the entry order. > > > > > > If you are using fragmentation for this table it will not. > > > > > > Informix has take the position that you should not be using ROWID at all. > > > > > It was an internal part of the engine and was not intended for end > > > user/programmer use. > > > > > > Why not put a datetime year to fraction in the record. This would > > provide > > > some useful data as to when the record was added and maintain the entry > > > order. > > > > > > Tim Porreca <tporreca@colburn.com> wrote in article > > > > In 7.2 DS, if I have a table in which I NEVER delete records, will the > > > > ROWIDs be added sequentially? We have notes tables which need to be > > > > retrieved in formcode in the order they were entered. > > OK, I have a date field already. How can I get formcode to retrieve > records on date order? It used to be that date order and ROWID order > where the same. Now when you retieve a customer's history, it comes > back in random order. Why not use an ORDER BY statement? If you don't want indexes left around, such as a data-warehouse, then what about creating a CLUSTER INDEX on your data field and then dropping it? This will re-order the records on disk. But remember, any new records are added to the end, which shouldn't be a problem for you. Hope that helps, -- Mark. +-------------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +------------------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work... force it! | |Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! | |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+------------------------------------------------+