What should you do to design the table to optimize storage space?

You are a database developer. You plan to design a database solution by using SQL Server 2008. The database will store multilingual data. The database will contain a table that has 100 million rows. The table will contain 1,000 columns that are based on the nvarchar(max) data type. For each column, only 2 percent of the rows will be populated. You need to design the table to optimize storage space. What should you do?

You are a database developer. You plan to design a database solution by using SQL Server 2008. The database will store multilingual data. The database will contain a table that has 100 million rows. The table will contain 1,000 columns that are based on the nvarchar(max) data type. For each column, only 2 percent of the rows will be populated. You need to design the table to optimize storage space. What should you do?

A.
Use row compression.

B.
Use NTFS file system compression to reduce the disk space used.

C.
Define the columns as sparse columns.

D.
Change the column data types to varchar(max).

Explanation:
Sparse columns are ordinary columns that have an optimized storage for null values. Sparse columns reduce the space requirements for null values at the cost of more overhead to retrieve nonnull values. Consider using sparse columns when the space saved is at least 20 percent to 40 percent.



Leave a Reply 0

Your email address will not be published. Required fields are marked *