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

Home -> Community -> Usenet -> c.d.o.server -> Re: varchar2 columns and space question

Re: varchar2 columns and space question

From: Allen Kirby <akirby_at_att.com>
Date: 1997/02/11
Message-ID: <33009008.769A@att.com>#1/1

Alvin Sylvain wrote:
<snip>
> I think this is probably true of older database systems. Oracle,
> at least the newer versions, distributes the information in
> wildly unpredictable fashions, such that it probably won't make
> any significant difference.
>
> Just because two columns are next to each other in your schema
> doesn't mean they're next to each other on disk.
>

><snip>

Alvin,

        If you understand how Oracle stores data then you obviously know that the order of columns in the data dictionary is precisely how Oracle interprets the raw data in the block. Oracle stores each column as <length><data> and the column type and name is derived from the data dictionary and the physical position of the column data in the row. The theory is that Oracle could assume that missing columns at the end of the row are null, and wouldn't need to store a positional length placemarker for each row, and would thereby save a few bytes per row. This was stated for V6 but wasn't actually implemented, so I've asked if anyone has verified this in 7. If it does work that way, and you know some columns are usually null, then it's very easy to put these at the end of your create statement. You might save a little storage space, but it really isn't worth a lot of time and effort unless you have LARGE rows with a LOT of NULLs.

-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Tue Feb 11 1997 - 00:00:00 CST

Original text of this message

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