Re: null columns and memory?

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@xxxxxxxxxxxxxxxxxxxx> 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
>

Other related posts: