DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Space used by NULL columns

Hybrid View

  1. #1
    Join Date
    Dec 1999
    Location
    Purgatory
    Posts
    346
    We currently have populated columns on a table of 50 million rows.

    The Data Protection Act means that we can, currently, no longer use specific columns, although this may change.

    I intend to maintain the columns, but with null values.

    Question:- How much space does a null value use ??

    I seem to think that it uses 1 byte, but am unsure.

    Please help......

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Each NULL value in a table consumes either 1 byte or 0 bytes. If there is a non NULL value stored in a column which is placed *after* your null value in the same record, your NULL will require 1 byte. If your NULL is in the last column or if all the columns after that column also contain NULLs, then they will require no space at all.

    So if your null columns are placed at the end of the record you'll save some space.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width