rowid ?
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
hi all, on informix online5, we used rowid in most of the 4GL code and AIK, INFORMIX IDS ver7 doesn't support rowid column. Any idea why they discarded the rowid ? (may be they encourage user to make use of primary key rather than rowid) if I insist to use the rowid to minimise the code changes any idea how it can be done ? Regards, ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
you can
create table my_table ....... with row-ids
not done this myself but I think it essentially gives you what you want.
Don't know about impact on performance.
--
---------------------------------------
Tony Flaherty aef@mfs.misys.co.uk
Analyst Programmer
Misys Financial Systems
All statements and opinions are my own,
Misys don't pay me enough to have opinions
on their behalf
.
K.Hong Lee wrote in message <7tu7bi$rmf$1@news.xmission.com>...
>
>hi all,
>
>on informix online5, we used rowid in most of the 4GL
>code and AIK, INFORMIX IDS ver7 doesn't support rowid
>column. Any idea why they discarded the rowid ? (may
>be they encourage user to make use of primary key
>rather than rowid) if I insist to use the rowid to
>minimise the code changes any idea how it can be done
>?
>
>Regards,
>
>=====
>
>__________________________________________________
>Do You Yahoo!?
>Bid and sell for free at http://auctions.yahoo.com
"K.Hong Lee" wrote: > > hi all, > > on informix online5, we used rowid in most of the 4GL > code and AIK, INFORMIX IDS ver7 doesn't support rowid This is a misconception. IDS 7 does indeed support the ROWID pseudo column for non-fragmented tables and one can add a hidden ROWID to fragmented tables so that code that depends on the ROWID can still work. The WITH ROWID option to a freagmented table CREATE TABLE statement, however, creates a real column, similar to a serial type column, and index which while efficient is not nearly as fast as the pseudo column in non-fragmented tables which is the logical page and slot number of the record, very much direct addressing. > column. Any idea why they discarded the rowid ? (may The ROWID, in 5.x and 6.x and in non-fragmented tables in 7.x, is the logical page number of the page containing the row within the table's TABLESPACE, times 0x100, plus the row's slot number on the page. Since a fragmented table essentially have more than one TABLESPACE (one for each fragment) all the rows on the Nth page in each fragment, or TABLESPACE, would have the same ROWID which would not work at all. Rather than come up with a new ROWID scheme using more bytes, which would not be compatible anyway, the WITH ROWID hidden column was implemented. > be they encourage user to make use of primary key > rather than rowid) if I insist to use the rowid to > minimise the code changes any idea how it can be done Sure, use non-fragmented tables or created fragmented tables WITH ROWID. Art S. Kagel