Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CHAR v. VARCHAR2: Space or Performance Optimization
Eric A. Stephens wrote:
>
> We are designing a fairly large DB and have concluded that using
> VARCHAR2 for all character data is acceptable since Oracle needs
> to store some data length information in each row piece in the
> data blocks.
In principle, varchar2 should save space and inprove performance, but
I have no quantative data to back this up. The reason:
- save space: The space used to hold length info is probably less
than the space wasted in fixed fields that are padded out to the
full width
- Performance improves: Sure, it takes some arithmatic to find the
varchar in the block, but the "payload" of each block is going
to be higher because each block can hold more rows. Therefore,
table scans get more data in for each I/O, which hopefully is
a much bigger improvement than the (presumably) few microseconds
you add for calculating offsets to access the variable fields.
Seem reasonable? Received on Fri Jul 11 1997 - 00:00:00 CDT