First message was not sent, so I am resending a shorter version to the list.
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@xxxxxxxxx> 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