Re: Informix "rowid" question
Posted in 1993
james.w.stringer writes:
|> The concept of creating a temporary table and using the internally
|> created rowid field seems like a viable way to control this through
|> the application, i.e.:
|>
|> for ( i = 1; i < maxrows; i++ ){
|> select * from "table" where rowid = i
|>
|> The things I need to know are:
|>
|> 1) Is rowid, as created by a temporary table, guaranteed to be
|> sequential?
For SE, pretty much. For OnLine, no.
|> 2) Is there a difference between the way OnLine and SE handle
|> rowids?
Yes. With SE, rowid is basically the record number in the file. With
OnLine, it is a value composed of page number and slot number for the row.
This means you will wind up with sequences such as:
301
302
303
304
305
401
402
403
...
depending on how many rows will fit on a page.
|> 3) If neither of these options hold water, is there an alternative
|> method to handle sequential selects?
SELECT * FROM <table> will force a sequential read, but I suspect thiswill not help you.
Dave
Disclaimer: These opinions are not those of Informix Software, Inc.
**************************************************************************
"I look back with some satisfaction on what an idiot I was when I was 25,
but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney