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
- to have float column datatype , null empty values
- to have float column datatype , -1.0 empty values
- 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
Post a Comment