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: null columns and memory?

Re: null columns and memory?

From: Ram K <lambu999_at_gmail.com>
Date: Wed, 28 Sep 2005 04:31:06 -0400
Message-ID: <db3c8dbf050928013143727a77@mail.gmail.com>


A related question:

Let us say there is block that contains 25 rows for a table with 2 columns:

RH|CL|CD|CL|CD|RH|CL|CD|CL|CD|RH|CL|CD|CL|CD|.....

and we add a new column to the table, will the data be stored like this:

Case 1:
RH|CL|CD|CL|CD|NewColLnth|Newcol|RH|CL|CD|CL|CD|NewColLnth|Newcol|...

If this is the case, will all the 25 rows in the block be rewritten to fit this format (I presume it works the same way for updates too, ie, updating a column with NULL to some value updates all 25 rows because of position adjustment, even though only 2 or 3 rows are affected). The rewriting may consume some CPU cycle? Will it be factor to consider in heavy OLTP systems?

Case 2:
Or will the 3rd column be stored like this:

RH|CL|CD|CL|CD|RH|CL|CD|CL|CD|RH|CL|CD|CL|CD|.....NewColLnth|Newcol|NewColLnth|Newcol| with the newcol data spilling over to the existing free space from PCTFREE in the block ? I dont think this case is likely.

 On 9/27/05, Gogala, Mladen <MGogala_at_allegientsystems.com> wrote:
>
> The short answer is: no, it isn't correct. The format of the row is this:
>
> |RH|CL|CD|CL|CD|CL|CD....
>
> RH=Row Header, which contains things like ITL entry
>
> CL=Column Length
>
> CD=Column Data
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 28 2005 - 03:33:10 CDT

Original text of this message

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