|
|
Archives of the TeradataForum
Message Posted: Thu, 19 May 2016 @ 22:27:11 GMT
Subj: | | Re: Alter Table - Add Columns |
|
From: | | Dieter Noeth |
Dave Wellman wrote:
| Even if the default is NULL for the new column then I think that we have to go through every row to set the null bit 'on' to indicate that
the new column in that row contains null. I'm assuming here that a '1' means the column contains null whilst '0' means it does not contain null.
Certainly that is how nulls are identified on the client side (which I accept may be different from how it is done in the dbms). | |
| Off the top of my head I can't come up with a scenario where adding a new column (or removing one) does NOT do a full table scan. | |
Hi Dave,
a new NULL-byte is probably initialized to binary zero and the Database Design manual
states that COMPRESS-bit 0 plus NULL-bit 0 indicate a compressed NULL.
I would bet that I tested this yeeears ago (on a V2) and adding a new column was much
faster with available NULL-bits. But a quick check on a 15.10 VM didn't show a
difference, I'm a bit confused now...
Dieter
| |