Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: What is sys_op_opnsize, exactly?

Re: What is sys_op_opnsize, exactly?

From: Charles Schultz <sacrophyte_at_gmail.com>
Date: Thu, 10 Aug 2006 09:50:16 -0500
Message-ID: <7b8774110608100750w2eb17a46xfe01036616bb7220@mail.gmail.com>


First message was not sent, so I am resending a shorter version to the list.

On 8/10/06, Charles Schultz <sacrophyte_at_gmail.com> wrote:
>
> Very interesting. Thanks Tim! (And thanks to Edgar Chupit for a sidebar
> note). So the next question, how is that useful to dbms_stats?
>
> SQL > select version from v$instance;
>
> VERSION
> -----------------
> 10.2.0.2.0
>
> SQL > select sys_op_opnsize(9999999999), sys_op_opnsize(10000000000) from
> dual;
>
> SYS_OP_OPNSIZE(9999999999) SYS_OP_OPNSIZE(10000000000)
> -------------------------- ---------------------------
> 6 2
>
> SQL > select sys_op_opnsize(9999999999999999),
> sys_op_opnsize(10000000000000000) from dual;
>
> SYS_OP_OPNSIZE(9999999999999999) SYS_OP_OPNSIZE(10000000000000000)
> -------------------------------- ---------------------------------
> 9 2
>
>
> On 8/10/06, Tim Gorman <tim_at_evdbt.com> wrote:
> >
> > Niall,
> >
> > I don't have a 10.2 database to play with, but the SYS_OP_OPSIZE
> > function is certainly returning byte-length for NUMBER datatypes as
> > well. Oracle uses a fixed-length (1-byte) exponent and a
> > variable-length mantissa for numerics, so using 2 bytes to represent the
> >
> > value of "1" is entirely expected.
> >
> > Using another method to validate the results of SYS_OP_OPSIZE, a block
> > dump of a table with eight rows consisting of the values you used in
> > your example
> >
>

-- 
Charles Schultz

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 10 2006 - 09:50:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US