Columns with varchar vs float in sql server for empty values -


in table there 50 columns float datatype, may empty ( ie null) , partially empty or full each row.

what ideal design case

  1. to have float column datatype , null empty values
  2. to have float column datatype , -1.0 empty values
  3. to have varchar datatype , null empty values.

i have come across fact if columns of variable length null not occupy space. in case 3rd option desirable afraid of performance due string comparisons search queries.

on considering performance , disk usage , ideal solution table.

edit :based on suggestions dropping of 2nd , 3rd choice. respect first choice better if create 50 seperate tables each column , join main table primary key . such there won't empty spaces , aslo can use decimal/long datatype. solution hold ?

use appropriate datatype. if columns floats, use floats. on limited info, go option 1. 3 terrible idea.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -