Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NOT NULL and NULL column position in Table Design

user4481510Dec 14 2017 — edited Dec 15 2017

Hi everybody,

I need to know the Performance issue while keeping columns in jumbled up position OR in sequence when we create a Table ?  [Database 11gR2]

See the following example :

Designing columns in haphazard way -

create table abc

   (a                      number(6)            not null  ,

    e                      varchar2(5)                        ,

    g                      date                                   ,

    c                      date                      not null  ,

    x                      varchar2(40)

  ) ;

Designing columns in sequence ("not null"  first, then all "null" columns) -

create table abc

   (a                      number(6)            not null  ,

    c                      date                      not null  ,

    e                      varchar2(5)                        ,

    g                      date                                   ,

    x                      varchar2(40)

  ) ;

I have read "blocks" will be populated in such a way, that Oracle has to read more bytes (in haphazard design) to go to next record, while less bytes has to be read for sequence desgin.  If that is so, then Performance would be affected  !!!

Please draw some light on this.

Thanks.

Sarkar

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2018
Added on Dec 14 2017
5 comments
636 views