Re: C++ equivalent type to Oracle's rowid.

From: <johnbhurley_at_sbcglobal.net>
Date: Tue, 24 Mar 2009 05:44:36 -0700 (PDT)
Message-ID: <0fa1ed2c-945f-429c-a560-ccb429aeac9e_at_37g2000yqp.googlegroups.com>



On Mar 24, 12:00 am, Shane <gshanemil..._at_verizon.net> wrote:
> Hi,
>
> What is the C/C++ equivalent to Oracle's rowid?
>
> Currently I am using OTL 4.0 and passing/returning rowids to Oracle
> stored procedures e.g.:
>
> insert into ... values( .. ) returning rowid into rw_id; # returning
> id
> update ... set .. where rowid=ord_id; # passing in id
>
> Right now my C/C++ type is char[19].
>
> As aside I was benchmarking a design which uses a unique primary index
> to perform the updates like this:
>
>   update ... ser where order_id=ord_id and order_date=ord_date;
>
> vs. a design in which there were NO/ZERO indexes and the update was
> done like:
>
>   update ... set .. where rowid=id;
>
> Unexpectedly the indexed version generally out performs the rowid
> approach. I was thinking that passing around 19 byte rowids and/or
> implicit chartorowid()/rowidtochar() were slowing down the rowid
> version.
>
> Shane

It has been emphasized for years ( decades even ) to stay away from logic operating on/using rowid's ... Received on Tue Mar 24 2009 - 07:44:36 CDT

Original text of this message