It should be 150. Is Varray allocating some extra space?
Why the length of JOBHISTORY field is 172 here
oracleoracle-10gtablevarchar
Related Question
- Does an Oracle nvarchar2 take twice as much space as varchar2
- Why is Oracle using the index here
- ORA-00984: column not allowed here
- MySQL – Possible INDEX on a VARCHAR Field
- Why TRUNCATE is Considered DDL in Oracle
- How to achieve using TRIM command on SELECT * From TABLE
- How to get the DDL for Oracle object without extra characters
- SQL – How to Remove Excess White Space from Table Values
Best Answer
Varray stores the total length of the varray and length of each element, so yes, it needs some extra bytes.
I am not aware of any public documentation on this topic, and I do not know the complete internal representation, so below is a simple example.
The relevant part from the dump:
The 3rd byte,
a2
, is the length of the column in bytes = 162 (col 1: [162]
).The 7th byte,
05
, is the number of elements in the array = 5.Starting after that, each element is stored as length + data. Length is
1e
= 30, and data is 30 times the letterA
= 0x41, and so on.